[Interest] Qt5 font size issue with fontconfig

Ramakanth Kesireddy rama.kesi at gmail.com
Fri Nov 6 14:00:15 CET 2020

Nope this didn't help. If setting pointsize appropriately for current
display 141 dpi would help to scale for other displays of different screen
sizes in future?

Is there any formula to calculate the font size in point size based on dpi
display which would work for all display sizes or just setting point size
would help?

Best Regards,

On Sat, 31 Oct, 2020, 18:02 Marc Van Daele, <marc.van.daele90 at gmail.com>

> Does setting
>     QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
> help?  This should be more or less the first line in your code.
> Marc
> On Sat, 31 Oct 2020 at 12:31, Ramakanth Kesireddy <rama.kesi at gmail.com>
> wrote:
>> Hi,
>> After porting the Qt 4.8 application to Qt 5.6.3 on embedded Linux(Yocto)
>> with fontconfig, the font sizes appear larger on target.
>> The Qt 4.8 application font size setting with 14pt default font appears
>> larger in Qt 5.6.3 with fontconfig and needed fonts added in default
>> fontconfig directory /usr/share/fonts.
>> The dpi of the device is 141.
>> Do I need to reduce the font size pt or set any environment variable
>> scale factor so that text appears normal?
>> Any suggestions are much appreciated.
>> Thanks and Regards,
>> Ramakanth
>> _______________________________________________
>> Interest mailing list
>> Interest at qt-project.org
>> https://lists.qt-project.org/listinfo/interest
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201106/20974d63/attachment.html>

More information about the Interest mailing list