‹ back home

Change in GTK's default font

2025-03-23 #desktop #font

After a system update last night, I noticed that Firefox and several other applications were using a different font for their UI. The new font renders larger glyphs, making all UIs look cramped, fit less text, and it’s somehow not as comfortable to read as the previous default (this last might be due to familiarity, but I do find the new default font too wide).

I used my laptop (which hadn’t been updated) as a reference to compare what’s changed and why a different font is being used. Not new fontconfig rules were installed, so fontconfig should behave the same.

GTK’s default font is configured via dconf, and is stored under the key org.gnome.desktop.interface.font-name (this is true even if my desktop isn’t GNOME; GTK configuration keys often start with org.gnome…). Checking this configuration value revealed that the default font had changed.

This value can be changed interactively using the dconf-editor GUI, or via the command line. The command line incantation to restore the previous default is:

dconf write /org/gnome/desktop/interface/font-name '"Cantarell 11"'

The double quotes are required because dconf expects a value surrounded by quotes, and the terminal will “swallow” the outer quote and treat their inner content as a single string.

Source of the change

The default values for dconf are stored in some XML files in /usr/share/glib-2.0/schemas. In this case, the value is in org.gnome.desktop.interface.gschema.xml, which is provided by the gsettings-desktop-schemas. The upstream changelog for this project lists the change in default font under Major changes in 48.beta. I’m not running beta; I’m running the final release, but it seems that this is one of those projects where stable releases don’t mention all applicable major changes; end users are expected to read all changelog details for release candidates and betas too.

Have comments or want to discuss this topic?
Send an email to my public inbox: ~whynothugo/public-inbox@lists.sr.ht.
Or feel free to reply privately by email: hugo@whynothugo.nl.

— § —