[Development] [QT5] System fonts are not loaded in ubuntu 12.04

liang jian jianliang79 at gmail.com
Sat May 5 08:16:11 CEST 2012

    I have built Qt 5 in ubuntu 12.04, The simplified chinese
character can't be displayed.
    I found that in QBaseFontDatabase::popluateFontDatabase() the font
path returned by fontDir() is "/mnt/sda8/liang/qt5/qtbase/lib/fonts/"
which is the path I built my Qt5, there are several fonts file in this
directory but there are no chinese font files. As a result of this,
the system font installed on my ubuntu 12.04 was not loaded and the
simplified chinese character can't be displayed.
    In Qt5 Windows platform, there is a classe named
QWindowsFontDatabase which is a subclass of QPlatformFontDatabase
which will search Windows Font using Windows API, I there any way to
search system fonts in XCB?

More information about the Development mailing list