[Development] QSGText: Why round glyph position like this?

Kai Uwe Broulik kde at privat.broulik.de
Mon Aug 28 18:22:45 CEST 2023


Hi everyone,

while investigating blurry font with native renderer in QML apps in 
Plasma 6 under Wayland with fractional scaling (devicePixelRatio 1.75 in 
my case), I stumbled upon QSGTextMaskMaterial::populate which rounds the 
glyph position [1] citing Mac OS behavior.

When I remove the rounding, font appears rendered correctly on my system 
(sorry for attachment ;), but this code hasn’t changed since 2014 and I 
am not very knowledgeable in this part of Qt. It’s also flooring the X 
and rounding the Y coordinate.

What’s the deal with that? Tor Arne, can you perhaps shed some light on 
this?

Cheers
Kai Uwe

[1] 
https://code.qt.io/cgit/qt/qtdeclarative.git/tree/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp#n455
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glyphbug3.png
Type: image/png
Size: 5281 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/development/attachments/20230828/e7732cd5/attachment-0001.png>


More information about the Development mailing list