The default system-ui font of Firefox on Linux

... is the GTK's default gtk-font-name settings.

What is system-ui?

You can change them in .config/gtk-4.0/settings.ini (or .config/gtk-3.0/settings.ini) like this:

gtk-font-name=Font Name 10

Read more to see how I found it.

  1. Looking for "system-ui" firefox landed me on this Firefox issue tracking the feature.
  2. The issue has an implementation here that maps the system-ui family to the internal menu font-family.
  3. Looking at the gfx/thebes/gfxPlatformFontList.cpp file in the implementation I saw StyleSystemFont::Menu. How do we find it?
  4. ... Searchfox of course! That leads me to widget/gtk/nsLookAndFeel.cpp...
  5. And from there just look for mMenuFontName that got assigned...
  6. From here, we know it's something from GTK. A quick look at ArchWiki on GTK shows that you can change gtk-font-name... so we just try it and 🎉