I just wanted to share this slightly annoying bug.
Seems to mainly affect ‘fractional scaling’ setups (those using, ex; 125%).
For me it presented as slightly broken fonts in places that would also sometimes fix themselves if a window was ‘refreshed’ somehow such as from a button press.
For now a workaround that fixed it for me was to set the ENV VAR
QT_SCALE_FACTOR_ROUNDING_POLICY="RoundPreferFloor"
(this is a good candidate for a global location like /etc/environment
)
After a reboot, thats it, no more wonky fonts.
A small quotation:
Actually any value, other than the Qt 6 default value “PassThrough”, seems to fix the issue:
Qt Namespace | Qt Core 6.7.1
Because the “Round”, “Ceil” and “Floor” settings also seem to solve the issue (not just the “RoundPreferFloor” setting).
According to the documentation, “Round” was the default setting for Qt 5 and “PassThrough” is the default setting for Qt 6:
High DPI | Qt 6.7
And only the “PassThrough” setting seems to cause the issue.
The documentation also seems to suggest that using any of the non-default settings (“Round”, “Ceil”, “Floor”, “RoundPreferFloor”) would round fractional values either up or down to the next integer value:
QGuiApplication Class | Qt GUI 6.7.1
But the size of the items on the screen do not seem to change at first glance. The only effect that those non-default settings seem to have is that the font rendering issue is fixed when using them.
For follow up and bug tracking here is a link:
https://bugs.kde.org/show_bug.cgi?id=479891