Skip to content

Which font does Firefox use for tabs (and other visual aids)?

I've been messing with custom themes in my Arch machine and created an oomox theme after many tries and then used gtk-chtheme to switch to it. I also used lxappearance to try and change a few things.

Result: I got exactly the colorset I wanted and turned off my computer

The next day I got Fira Mono in my waterfox tabs. So I thought I just revert back what I did yesterday and set another theme in lxappearance and restarted. Didn't work. Then I tried manually setting the font in "Waterfox->Preferences->Content" and rebooted: does not work.

I'm kind of familiar with fc-* commands but it always drives me nuts until I get it right.

I'd be eternally thankful if someone could spare me an eternity trying to fix this or reinstalling my OS. Has any of you dealt with this problem?

EDIT:

I think the actual question I'm trying to make here is, where does Firefox/Waterfox try to load font definitions for it's own UI?

EDIT2:

$ strace waterfox 2>&1|grep -i font

openat(AT_FDCWD, "/usr/lib/libfontconfig.so.1", O_RDONLY|O_CLOEXEC) = 4

How can I use this information?

Edited 7 Jan 2019. We only hold this version.

3 points5 comments
Open on Reddit
About this post
Posted
Archived
Edited
Score
3 · 100% up
Kind
Text
ID
adhqaf

Author

39
posts
206
comments
8
media
View profile

5 comments

Did you check your font settings in ~/.config/gtk-3.0/settings.ini? Those don't necessarily change with the theme.

3 points

Thank you for the quick response!

I did not know about the existence of this file. Unfortunately this one seems to be changing alright:

[Settings]
gtk-theme-name=Adwaita-dark
gtk-icon-theme-name=Adwaita
gtk-font-name=Droid Sans Mono for Powerline 11
gtk-cursor-theme-name=Adwaita
gtk-cursor-theme-size=0
gtk-toolbar-style=GTK_TOOLBAR_BOTH
gtk-toolbar-icon-size=GTK_ICON_SIZE_LARGE_TOOLBAR
gtk-button-images=1
gtk-menu-images=1
gtk-enable-event-sounds=1
gtk-enable-input-feedback-sounds=1
gtk-xft-antialias=1
gtk-xft-hinting=1
gtk-xft-hintstyle=hintfull
gtk-xft-rgba=rgb

I changed back my theme to Adwaita-dark because it's the least ugly default one. Appearantly it changed this file as well. It says it's using Droid Sans Mono but I'm fairly certain it's not showing this on Firefox. I'm almost positive Firefox is using Fira, which is my terminal's

1 points

Firefox UI is fully customizable using UserChrome.css, including tab font. http://kb.mozillazine.org/index.php?title=UserChrome.css

2 points

Thanks a lot! I was using userChrome.css to change background color. I added *{font-family: Droid Sans} and indeed there was Droid Sans! Thanks a ton brother I was about to reinstall my OS. Do you have resources on how to go about configuring fonts on arch? More than half the time I spend on setting up a new machine, I spend on getting glyphs, ligatures and devicons to coexist on the same font. I'd love a cheatsheet for this.

1 points

I don't think I have a easy pointer to follow.

Go over Arch wiki article for basic fontconfig. Configure gtk and qt font settings using something like qgtkstyle to use sans-serif (to follow your fontconfig sans-serif). For firefox, you may want to additionally configure user.js to adjust something like user_pref("font.name.sans-serif.x-unicode", "sans-serif"); (again, to make it follow your fontconfig. you need to repeat this for every locale and font name)

It's absurd how every single layers of UI disobeys my user fontconfig that I have to make it explicit that I freaking want "sans-serif" when I say "sans-serif".

2 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.