1

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.

  • Welcome to askubuntu. You have a question related to webdevelopment/webdesign. You should ask it in the specific community. stackoverflow.com for instance, there is already an answer waiting for you: stackoverflow.com/questions/3837249/… – mondjunge Aug 28 '18 at 7:03
  • That isn't the issue I'm having. The CSS code I provided was just an example. The issue is fonts loaded through stylesheets with @font-face work fine in the browser, but fonts referenced by their name that I have installed locally on my computer do not load. – Toad King Aug 28 '18 at 22:58
  • @ToadKing Try "refreshing" Firefox or create a new Firefox profile and see if the problem persists. – pomsky Aug 28 '18 at 23:15
  • @pomsky Making a fresh profile does not fix it. – Toad King Aug 29 '18 at 3:35
  • 1
    This is a Firefox/Ubuntu problem. You do not need to declare local font faces to use them in a browser. It works on Windows, and it works in Linux in Chromium. Websites like Twitter are using the wrong font because of this bug. – Toad King Aug 31 '18 at 4:27
2

Same situation here, same KDE neon and Firefox version. Lost a whole day to solving this . By comparing files from backup I noticed a change in file: /etc/fonts/conf.avail/56-neon-noto.conf is the cause of this problem (in my case).

In the file a section has been added with a comment:

# Firefox is weird. Explicitly force emoji to the top. Aggressive but whatevs.

When I commented out (by putting # at the start of the line) two sections below that comment, everything went back to normal.

2

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.

  • Hooray! For me the problem was solved by removing both fonts-twemoji-svginot and fonts-emojione-svginot. – Sebastian Paaske Tørholm Nov 15 '18 at 9:46
0

I have the same issue with Firefox 62.0.3 after upgrading my KDE neon to the recent version based on Ubuntu 18.04. Only Firefox does not use locally installed fonts anymore. Any other browser I tried (Chromium and Chrome) uses the installed fonts.

It is not a web development problem. font-family: "FreeMono" only is valid CSS and tells the browser, that it should use this font if it is installed on the client's machine. Otherwise the browser will use its default font. Toad King's problem is that Firefox neither use the installed font nor the default fallback defined in the preferences.

Today, I used the current developer edition (63.0b13) via flatpak and the local fonts worked for it. Hopefully, the issue will be solved with an upcoming Firefox release.

Update 2018-10-10: Today I got a big update to KDE neon 5.14. It changed the file /etc/fonts/conf.avail/56-neon-noto.conf mentioned by @srbija-sport. The Firefox part seems to be removed and now the fonts in Firefox are working again.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.