Details
-
Bug
-
Resolution: Won't Do
-
P3: Somewhat important
-
None
-
5.15.8
Description
The Qt Font Dialog sporadically does not resolve the font size correctly when it is in pixels.
The problem can be reproduced when you have multiple displays connected all with different scaling defined in OS.
If there are 2 displays: primary screen has scaling 100%, the other 125%.
and if QFontDialog is open on the display with 125% scaling the Font size is not resolved correctly.
Despite the font has a correct size in pixels (see debug output).
Attached simple example and video which demonstrate it.
Update:
Steps to reproduce: Use modified example.
The problem can be reproduced when you have multiple displays connected all with different scaling defined in OS.
The issue occurs for some fonts and sizes (not for all) when using Qt Font Selector.
I can always reproduce this bug with the following configuration:
- Primary monitor - 100% scaling
- Secondary monitor - 125% scaling
Please follow these steps:
1. You need to have a Font Selector on the secondary monitor (the one with 125% scaling).
2. Select Arial font and a font size 10 and click OK in the Font Selector.
3. Open Font Selector again (it should be opened on the same monitor where it was closed - secondary monitor). The previously selected font with the size is correctly preselected - Arial 10.
4. Change font size to 9 and click OK in the Font Selector.
5. Open Font Selector again (it should be opened on the same monitor where it was closed - secondary monitor). The previously selected font with the size is preselected - Arial 9 (it is good).
6. Change font size to 8 and click OK in the Font Selector.
7. Open Font Selector again (it should be opened on the same monitor where it was closed - secondary monitor). There is a wrong font size preselected in the Font Selector! You can see Arial 10, instead of Arial 8. However, the debug output shows the correct font size in pixels. That is a bug in the Font Selector not correctly resolving the font size in pixels.