Results 1 to 9 of 9

Thread: Font Problem

  1. #1
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Exclamation Font Problem

    Hi,

    When I run application on my board, it shows following errors.

    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans-Bold.ttf
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans.ttf
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans-Oblique.ttf
    I am not able to get fonts like, Adobe Courier, Adobe New Century School, Adobe Times, Sans Serif, Monospace, Andy MT, Sony Fixed, Utopia.

    When I run same application on Desktop, I can get all type of font but not on my ARM board

    I have installed all the fonts available in font dir to my board dir on right path.
    I am able to get only Courier fonts.

    Is there any need to install separate fonts(i.e. compile font library separately and place in to board)

    Your suggestion would be a great help for me..
    Last edited by nrabara; 18th December 2009 at 10:58. Reason: updated contents

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Font Problem

    Does your board support true type fonts at all? It should do it through freetype library.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. #3
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font Problem

    You need to check if Qt has been linked against libfreetype and libfontconfig:
    Something like this:

    ldd /usr/lib/qt4/libQtGui.so
    linux-vdso.so.1 => (0x00007fff297a1000)
    libaudio.so.2 => /usr/lib/libaudio.so.2 (0x0000003a99200000)
    libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0000003a95600000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000003a94e00000)
    libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x0000003a94a00000)
    libSM.so.6 => /usr/lib/libSM.so.6 (0x0000003a97a00000)
    libICE.so.6 => /usr/lib/libICE.so.6 (0x0000003a97e00000)
    libQtCore.so.4 => /usr/lib/qt4/libQtCore.so.4 (0x0000003a90c00000)
    libz.so.1 => /lib/libz.so.1 (0x0000003a92200000)
    libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x0000003a93a00000)
    libpthread.so.0 => /lib/libpthread.so.0 (0x0000003a91e00000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0x0000003a96200000)
    libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x0000003a96600000)
    libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x0000003a95e00000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000003a95a00000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0x0000003a94600000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0x0000003a92e00000)
    libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.2/libstdc++.so.6 (0x0000003a94200000)
    libm.so.6 => /lib/libm.so.6 (0x0000003a91a00000)
    libc.so.6 => /lib/libc.so.6 (0x0000003a91200000)
    libXt.so.6 => /usr/lib/libXt.so.6 (0x0000003a98200000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0x0000003a93200000)
    libuuid.so.1 => /lib/libuuid.so.1 (0x0000003a97600000)
    libgthread-2.0.so.0 => /usr/lib/libgthread-2.0.so.0 (0x0000003a90400000)
    librt.so.1 => /lib/librt.so.1 (0x0000003a96e00000)
    libdl.so.2 => /lib/libdl.so.2 (0x0000003a91600000)
    /lib64/ld-linux-x86-64.so.2 (0x0000003a8fc00000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000003a95200000)
    libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x0000003a92a00000)
    libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000003a93600000)
    libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x0000003a93e00000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0000003a92600000)
    Notice libfreetype and libfontconfig. Also check if TrueType support has been enabled in freetype itself. If not - then you need to rebuild libfreetype and replace original one with new.

    Regards,
    -- tanuki

  4. #4
    Join Date
    Sep 2008
    Posts
    58
    Thanks
    11
    Qt products
    Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Font Problem

    Thank for your suggestion, but still I am facing problem with fonts.
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans-Bold.ttf
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans.ttf
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans-Oblique.ttf
    Does your board support true type fonts at all? It should do it through freetype library.
    I have cross compiled freetype font library and then recompiled qt embedded with freetype font libraray( command line option -system-freetype).

    On my ARM board I dont have ldd command.
    so I cant check linking like desktop as below
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000003a95a00000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000003a94e00000)

    I have used strace, it shows me same,
    Initializing QFontEngineQPF failed for /home/qt/lib/fonts/DejaVuSans-Bold.ttf

    Also check if TrueType support has been enabled in freetype itself.
    Is this mean to configure TTF in freetype font by using qconfig tool ?

    If not - then you need to rebuild libfreetype and replace original one with new.
    you mean to say, I need to update freetype font libraray in qt folder with the latest release and then recompile.

    I have also tried makeqpf tool to convert .ttf file to .qpf2 but I think it also not functioning properly because it create very large filr verdana_50_50.qpf2(2.1 MB) from verdana.ttf(448 kb).

    I really got stuck with this font problem, I would really appreciate if somebody put some more focus on this.

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Font Problem

    Quote Originally Posted by nrabara View Post
    I have also tried makeqpf tool to convert .ttf file to .qpf2 but I think it also not functioning properly because it create very large filr verdana_50_50.qpf2(2.1 MB) from verdana.ttf(448 kb).
    That's normal. The file is bound to be larger than ttf because the glyphs are prerendererd.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font Problem

    Is this mean to configure TTF in freetype font by using qconfig tool ?
    Hi, freetype configuration described in many conferences and in FAQ on freetype site. As I remember you need to edit config file and enable TTF support for it (or via configure). Also, you need to recompile the fontconfig which is also linked against freetype and used by Qt for font operations.

    Good luck,

    -- tanuki

  7. #7
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Font Problem

    Let's not be so hasty. There is 99% chance his libfreetype already supports TTF fonts, provided he has a plugin for Qt/Embedded to use it or that Qt links against it directly. Qt libs can be copied to desktop and ldd can be used there to determine that.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  8. #8
    Join Date
    Sep 2009
    Location
    Tashkent, Uzbekistan
    Posts
    107
    Thanks
    1
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Font Problem

    Wysota, he hasn't ldd.

    On my ARM board I dont have ldd command.
    so I cant check linking like desktop as below
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000003a95a00000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000003a94e00000)
    But he can use strings/grep to determine that. I'm not sure that all links in the chain are correct. Usually when you change underlying libraries you have to rebuild the whole chain for Qt.

  9. #9
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Font Problem

    Quote Originally Posted by Tanuki-no Torigava View Post
    Wysota, he hasn't ldd.
    Read my post again.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Replies: 1
    Last Post: 15th May 2009, 07:16
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. font can not be changed
    By ashishsaryar in forum Qt Programming
    Replies: 4
    Last Post: 28th May 2008, 15:32
  5. problem with Font changing
    By phillip_Qt in forum Qt Programming
    Replies: 22
    Last Post: 25th April 2008, 04:37

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.