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

Loaden loaden at gmail.com
Mon May 14 10:15:38 CEST 2012


The issue still exist.
In Ubuntu 12.04, the 'fontconfig' package installed by default.

> loaden at qpsoft:~$ sudo apt-get install fontconfig
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> fontconfig is already the newest version.
> 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
>
And the FontConfig value is 'auto'.

> FontConfig support ..... auto


2012/5/7 <jiang.jiang at nokia.com>

> 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 at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/development
>



-- 
Please don't ask where I come from, It's a shame!
Best Regards
Yuchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120514/75ff873d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: config.log
Type: application/octet-stream
Size: 141660 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120514/75ff873d/attachment.obj>


More information about the Development mailing list