Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Fonts not showing Qt Apps in Qt5.7

Fonts not showing Qt Apps in Qt5.7

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
2 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • embdevE Offline
    embdevE Offline
    embdev
    wrote on last edited by
    #1

    Hi all, the fonts in my compiled Qt5 apps are not showing up. i understand Qt 5.7 do not carry fonts anymore and need to install separately. So i tried to cross-compile fontconfig but somehow unsuccessful. I've performed the following steps:

    1. Configure parameters for fontconfig are as follow:
    ./configure --prefix=/home/aa/Hi3536_SDK_V2.0.4.0/fontconfigArm --host=arm-hisiv400-linux --enable-static --disable-docs --enable-libxml2
    

    performed make function and received the following errors:

    config.status: creating src/fcstdint.h : _FONTCONFIG_SRC_FCSTDINT_H
    aa@aa:~/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1$ make
    make  all-recursive
    make[1]: Entering directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1'
    Making all in fontconfig
    make[2]: Entering directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1/fontconfig'
    make[2]: Nothing to be done for 'all'.
    make[2]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1/fontconfig'
    Making all in fc-blanks
    make[2]: Entering directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1/fc-blanks'
      GEN      fcblanks.h
    Traceback (most recent call last):
      File "./fc-blanks.py", line 14, in <module>
        from lxml import html
    ImportError: No module named lxml
    Makefile:595: recipe for target 'fcblanks.h' failed
    make[2]: *** [fcblanks.h] Error 1
    make[2]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1/fc-blanks'
    Makefile:581: recipe for target 'all-recursive' failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory '/home/aa/Hi3536_SDK_V2.0.4.0/otherFiles/fontsLib/fontconfig-2.12.1'
    Makefile:465: recipe for target 'all' failed
    make: *** [all] Error 2
    

    Does anyone has any advice?

    Thanks!

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Tirupathi Korla
      wrote on last edited by Tirupathi Korla
      #2

      Hi,
      Instead of installing fonts separately, you can add fonts in resource.qrc file of your project as you add images. add the below line in qml file to import
      FontLoader { id: fontFamily; source: "/font/font.ttf" }

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved