Created attachment 1766890 [details] Screenshots comparing GTK4 and GTK3 font rendering Description of problem: The font rendering of GTK4 is unexpectedly worse than GTK3. Primarily, the anti-aliasing does not respect hinting (or it is not hinting the same way as before) resulting in 'fuzziness' most visible on horizontal strokes. The attached image compares GTK4 and GTK3 with their respective demo programs. Note the crisper rendering on the GTK3-side. This is with RGB subpixel anti-aliasing and slight hinting enabled in both dconf and fonts.conf (reproduced below). Version-Release number of selected component (if applicable): gtk4-4.1.2-1.fc34.x86_64 gtk3-3.24.27-1.fc34.x86_64 pango-1.48.3-1.fc34.x86_64 freetype-2.10.4-3.fc34.x86_64 harfbuzz-2.7.4-3.fc34.x86_64 Expected results: Glyphs rendered identically to GTK3. fonts.conf content: <?xml version='1.0'?> <!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> <fontconfig> <match target="font"> <edit mode="assign" name="antialias"> <bool>True</bool> </edit> <edit mode="assign" name="rgba"> <const>rgb</const> </edit> <edit mode="assign" name="hintstyle"> <const>hintslight</const> </edit> <edit mode="assign" name="lcdfilter"> <const>lcddefault</const> </edit> </match> <dir>~/.fonts</dir> </fontconfig>
Created attachment 1766990 [details] Same comparison with GTK 4.0.3 on F33 Screenshots added for comparison: gtk4-4.0.3-1.fc33.x86_64 on Fedora 33 has what I consider the correct rendering behaviour.
Could you file this upstream https://gitlab.gnome.org/GNOME/gtk, please?
Actually, looks like there's already a ticket upstream: https://gitlab.gnome.org/GNOME/gtk/-/issues/3787
(In reply to Kalev Lember from comment #3) > Actually, looks like there's already a ticket upstream: > https://gitlab.gnome.org/GNOME/gtk/-/issues/3787 Ah yes. Noted, I'll keep an eye on it.
(In reply to Kalev Lember from comment #3) > Actually, looks like there's already a ticket upstream: > https://gitlab.gnome.org/GNOME/gtk/-/issues/3787 It seems like upstream denies the existence of this bug.
Are all stakeholders/CCs here happy for me to close this bug as UPSTREAM (and subscribe to GNOME Gitlab #3787)? I don't think there's much point cluttering RHBZ by keeping it open here.
We will deviate from upstream here.
Well this is built for rawhide as gtk4-4.7.2-2.fc38. I'm having trouble building for F37 due to koji availability issues, but the patch is applied to the dist-git repo so it will get picked up next time somebody manages to build it.