Ubuntu – Firefox only uses its default font, can’t use any others

18.04firefoxfonts

Firefox can't seem to use any fonts I've installed. It can list them in the Preferences page under the Fonts & Colors section, but selecting any there doesn't seem to do anything. Also, any CSS styles on webpages do not use any local fonts if referenced, only ones loaded from stylesheets work. So font-family: "FreeMono" doesn't work, but something like:

@font-face {
  font-family: "Open Sans";
  src: url("/fonts/OpenSans-Regular-webfont.woff2") format("woff2"),
       url("/fonts/OpenSans-Regular-webfont.woff") format("woff");
}

* {
  font-family: "Open Sans";
}

does work. Chromium has working fonts on the same computer, and so do other apps.

I've tested in both Firefox 61.0.1 (64-bit) and Firefox Developer Edition 62.0b20 (64-bit), and I'm on Ubuntu 18.04 running Gnome 3.28. I've ran fc-cache -r to make sure my font caches are up to date and disabling the sandbox in Firefox does not do anything.

Best Answer

I finally found out the issue: I had a fonts-twemoji-svginot PPA package installed that was messing up Firefox. I installed it to work around an issue with emojis in Thunderbird subject lines being super big and I guess it messed up Firefox. Uninstalling it fixed Firefox and I guess I'll need to figure out another way to fix Thunderbird.