Font Rendering Issue: Blurry Fonts on Arch Linux with GNOME & Wayland

Hello everyone,

I recently installed Arch Linux with GNOME as my desktop environment and Wayland as the windowing system. However, I have been facing a font rendering problem where the fonts appear blurry and not as sharp as expected, even before I made any changes to the default font settings.

I have tried adjusting the font settings in GNOME Settings, including font scaling, hinting, and antialiasing, but the issue persists. Additionally, I have installed popular font packages such as ttf-dejavu and noto-fonts to ensure the availability of standard fonts.

The problem seems to affect the entire interface, making the text less readable and causing discomfort during extended usage.

System Details:

GNOME version: 44.3
Windowing system: Wayland
Kernel version: Linux 6.1.39-3-lts
Graphics: Intel(R) HD Graphics 620 (KBL GT2)
I have also run glxinfo to check the graphics renderer, but it doesn’t seem to provide any information related to the font rendering issue.

I have examined the font configuration files in /etc/fonts/conf.d/ and /etc/fonts/fonts.conf, but I could not identify any conflicting settings.

I am seeking assistance from the Arch Linux and GNOME communities to help me diagnose and resolve this font rendering problem. Any suggestions, tips, or potential solutions are greatly appreciated.

Thank you for your time and support.

The images:
Problem image 1: sample_problem.png
Problem image 2: sample_problem2.png
About system: about_system.png
Display configuration: tweaks_config.png



sample_problem2

Which versions of:

  • GTK 4
  • Cairo

are installed on your system?

For GTK 4 apps on Arch Linux for me the solution was to create the file ~/.config/gtk-4.0/settings.ini with this in it:

[Settings]
gtk-hint-font-metrics=1

(From the wiki.)

Arch Linux has GTK 4 4.10.4 and Cairo 1.17.8.

That won’t be necessary with GTK 4.12, incidentally.

pkg-config --modversion gtk4 = 4.10.4
pkg-config --modversion cairo = 1.17.8

These are the versions.

I tried doing this and restarted my pc. Did not see quite the changes. Can it be due to some other reason?

I don’t know if this is the cause but you should probably set antialiasing to subpixel.

you should probably set antialiasing to subpixel

With gtk4 there is no subpixel antialiasing and enabling it might actually make the font rendering slightly worse. The renderer stores the alpha values of a rendered glyph in texture cache and then when drawing it to the screen it uses these alpha values to draw the glyph in the requested color. With subpixel antialiasing enabled it still does the same, so the colors from the subpixel antialiasing will be discarded and only the alpha values will be used. However the alpha values are now the ones that have been adjusted for the subpixel colors which are not being used.

@jakedane I tried it. It still not changed.

@skeller Could there be any other reason for this? I can provide log files and images if required. I tried changing my display server from wayland to Xorg but the fonts still looks the same.

From looking at the gnome-tweaks screenshot, which uses gtk3, there are some color fringes when zooming in, so there probably is some fontconfig setting forcing subpixel antialiasing which overrides the options set in tweaks. And like I already said subpixel antialiasing can give slightly wrong results in gtk4, but I’m not sure if those are really noticeable though.

Also make sure to restart your session after you make changes to ~/.config/gtk-4.0/settings.ini.

@skeller i shut down the system after making that change and turn on the pc but it still looks the same.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.