[Interest] Qt5 font size issue with fontconfig

Stan Morris pixelgrease at gmail.com
Sat Nov 7 16:46:18 CET 2020


If targeting an embedded device you know the DPI and can use it to set
pixelSize and width/height like so:
  Text { pixelSize: 24*UI.pt }
  Rectangle { width: 12*UI.cm; height: 6*UI.cm }

Example: https://github.com/pixelgrease/Qt-logical-units

From: Ramakanth Kesireddy <rama.kesi at gmail.com>
> To: Marc Van Daele <marc.van.daele90 at gmail.com>
> Cc: Qt Interest <interest at qt-project.org>
> Bcc:
> Date: Fri, 6 Nov 2020 18:30:15 +0530
> Subject: Re: [Interest] Qt5 font size issue with fontconfig
> 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,
> Ramakanth
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20201107/43c7f825/attachment.html>


More information about the Interest mailing list