The default system-ui font of Firefox on Linux
... is the GTK's default gtk-font-name settings.
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.
- Looking for
"system-ui" firefoxlanded me on this Firefox issue tracking the feature. - The issue has an implementation here that maps the
system-uifamily to the internalmenufont-family. - Looking at the
gfx/thebes/gfxPlatformFontList.cppfile in the implementation I sawStyleSystemFont::Menu. How do we find it? - ... Searchfox of course! That leads me to
widget/gtk/nsLookAndFeel.cpp... - And from there just look for
mMenuFontNamethat got assigned... - 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 🎉