Description of problem: GTK 4 fonts are blurry in Fedora apps compared to Flathub versions. Version-Release number of selected component (if applicable): gtk4-4.4.0-4 How reproducible: Install any gtk4 app RPM and Flathub version. For example: - Fedora: dnf install gnome-extensions-app - Flathub: flatpak install flathub org.gnome.Extensions Actual results: Blurry fonts in Fedora version. Expected results: Nicely looking fonts like in Flathub version. Flathub version also look equal to current GTK 3 version. Additional info: Demo screenshots attached in next post. Also browser version: - Fedora: https://atim.fedorapeople.org/gtk4-fedora.png - Flathub: https://atim.fedorapeople.org/gtk4-flathub.png
Created attachment 1831221 [details] GTK4-Fedora
Created attachment 1831222 [details] GTK4-Flathub
Created attachment 1871827 [details] Fedora 36 Beta and Fedora 35 font rendering compared
Issue is more apparent in Fedora 36 Beta, where more default applications were updated to GTK4. E.g. in this screenshot of Settings, Fedora 36 Beta on the left and Fedora 35 on the right. Subpixel antialiasing (for LCD screens) is enabled using GNOME Tweaks on both versions. Notice, how Fedora 35 fonts are much crisper and have better legibility on standard DPI monitor.
In Fedora 36, many applications have upgraded from GTK 3 to GTK 4. Text rendering in GTK 4 is different from in GTK 3. Notably, GTK 4 uses subpixel positioning, which is intended to improve text clarity and legibility. However, due to an unidentified bug, it currently just makes fonts blurry instead. The developers welcome assistance to identify and correct this issue. In the meantime, you may configure GTK 4 to render text more similarly to GTK 3 by creating a ~/.config/gtk-4.0/settings.ini which contains the following: ``` [Settings] gtk-hint-font-metrics=1 ```
Some clarifications, maybe: Yes, GTK 4 is using subpixel positioning, which is basically incompatible with hinting. I wouldn't say that is intended to improve text clarity and legibility, really. It is intended to provide linear layout and better compatibility between text layout and animation and transformation. And it is _expected_ to make font rendering somewhat blurrier. The current implementation has bugs that make thing more blurry than necessary, some of which _have_ recently been identified and fixed (but not in F36 yet).
It is also worth explicitly pointing out that subpixel antialiasing is not a feature that is supported in GTK4 font rendering.
OK, next try at text for CommonBugs. Please review it again to make sure I have this right: In Fedora 36, many applications have upgraded from GTK 3 to GTK 4. By default, text rendering in GTK 4 uses subpixel positioning, whereas GTK 3 used hinting instead. Subpixel positioning, which is incompatible with hinting, is intended to provide linear layout and better compatibility with animation and transformation. It is also expected to make font rendering somewhat blurrier. While this is an intentional design choice, the current implementation has bugs that make things more blurry than necessary. Some of these bugs have recently been identified and fixed, but the fixes are not available in Fedora 36 as of its release date, and other bugs remain. Assistance to identify and correct remaining bugs is welcome. If you want, you may configure GTK 4 to render text more similarly to GTK 3 by creating a ~/.config/gtk-4.0/settings.ini which contains the following: ``` [Settings] gtk-hint-font-metrics=1 ``` Subpixel positioning is not to be confused with subpixel antialiasing (rgba antialiasing), both of which are sometimes referred to using the ambiguous term "subpixel rendering." GTK 3 supported subpixel antialiasing, but not by default. GTK 4 does not support subpixel antialiasing.
Thanks. Here is my reshuffling of this information. Leaving technical details to the end, and avoiding the call for a bug flood: ---- In Fedora 36, many applications have upgraded from GTK 3 to GTK 4. Font rendering in GTK 4 is different from GTK 3, and is expected to be a bit blurrier. While this is an intentional design choice, the current implementation has bugs that make things more blurry than necessary. Some of these bugs have recently been identified and fixes will be made in Fedora 36 as they become available. If you want, you may configure GTK 4 to render text more similarly to GTK 3 by creating a ~/.config/gtk-4.0/settings.ini which contains the following: ``` [Settings] gtk-hint-font-metrics=1 ``` In detail, font rendering in GTK 4 uses subpixel positioning to improve linearity of text layout and shape fidelity, which is incomatible with hinting. Subpixel positioning is not to be confused with subpixel antialiasing (rgba antialiasing), both of which are sometimes referred to using the ambiguous term "subpixel rendering." GTK 3 supported subpixel antialiasing, but not by default. GTK 4 does not support subpixel antialiasing.
Thank you very much for the write-up. I published it here: https://ask.fedoraproject.org/t/common-issues/21897
This message is a reminder that Fedora Linux 35 is nearing its end of life. Fedora will stop maintaining and issuing updates for Fedora Linux 35 on 2022-12-13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a 'version' of '35'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, change the 'version' to a later Fedora Linux version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora Linux 35 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora Linux, you are encouraged to change the 'version' to a later version prior to this bug being closed.
Fedora Linux 35 entered end-of-life (EOL) status on 2022-12-13. Fedora Linux 35 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora Linux please feel free to reopen this bug against that version. Note that the version field may be hidden. Click the "Show advanced fields" button if you do not see the version field. If you are unable to reopen this bug, please file a new report against an active release. Thank you for reporting this bug and we are sorry it could not be fixed.
In Fedora 38 the gnome-text-editor fonts are too blurry. And gtk-hint-font-metrics=1 didn't work. I also think gnome-terminal is too blurry.