On May 5, 2012, at 8:16 AM, ext liang jian wrote: > 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?
Build Qt with fontconfig development package installed (configure should show fontconfig enabled), then QFontconfigDatabase will be used instead of QBasicFontDatabase. - Jiang _______________________________________________ Development mailing list Development@qt-project.org http://lists.qt-project.org/mailman/listinfo/development