PDA

View Full Version : Qt app showing wrong font



RolandHughes
10th April 2014, 21:48
Qt Creator correctly shows and uses the Tahoma font installed on the Ubuntu VM when designing widgets. There are no style sheets involved. In the Unbuntu VM when the application runs it shows some icky nasty Serif font which is also the wrong point size. Under bitbake it shows the correct font.

4.8.x of Qt

This problem seems to be rather pervasive as I've encountered others that have it. Any solutions?

Thanks,

wysota
11th April 2014, 08:56
The problem seems to be with your system settings which are picked up by the application. Hard to say anything more detailed though. Qt respects FontConfig so you might start looking at your settings there.

RolandHughes
18th May 2014, 21:16
The problem seems to be with your system settings which are picked up by the application. Hard to say anything more detailed though. Qt respects FontConfig so you might start looking at your settings there.

Actually, it appears there are some vast issues with Qt and different Linux desktop versions. The slightest difference in versions, at least on KDE desktop means the application will not get the correct fonts. Currently developing on Ubuntu 12.04.3 LTS and qt-everywhere 4.8.3 built from source on this system. Does not get correct font. Another box running the exact same VM image can install the Qt dev packages from the distro repositories, build the exact same application from source and have it bring in the correct fonts.