This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

ابحث في الدعم

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

Incorrect fallback fonts on Linux

  • 4 ردود
  • 1 has this problem
  • 25 views
  • آخر ردّ كتبه Peter

more options

I have explained the issue on stack exchange, please take a look at this link: https://unix.stackexchange.com/questions/557237/firefox-fallback-font

It is a clean install, no userChrome etc., all settings are default

I have explained the issue on stack exchange, please take a look at this link: https://unix.stackexchange.com/questions/557237/firefox-fallback-font It is a clean install, no userChrome etc., all settings are default

All Replies (4)

more options

Did you check in the Font Inspector what font(s) Firefox is using for each case?

For me Helvetica uses NimbusSanL-Regu (Nimbus Sans L) and the Arial cases use Liberation Sans, so it appears the for Arial no fallback to sans-serif is used. The last Sans-serif case uses the default font as set in Options/Preferences (DejaVu Sans) as expected. You didn't include a Serif case, so I'm not seeing the default Serif font being used. With zooming there is not much difference.

data:text/html;charset=utf-8;base64,PGJvZHk+CiAgICA8cCBzdHlsZT0iZm9udC1mYW1pbHk6IEFyaWFsIj5oZWxsby B3b3JsZCAoQXJpYWwpPC9wPgogICAgPHAgc3R5bGU9ImZvbnQtZmFtaWx5OiBIZWx2ZXRpY2EiPmhlbGxvIHdvcmxkIChIZWx2 ZXRpY2EpPC9wPgogICAgPHAgc3R5bGU9ImZvbnQtZmFtaWx5OiBBcmlhbCwgSGVsdmV0aWNhLCBzYW5zLXNlcmlmIj5oZWxsby B3b3JsZCAoQXJpYWwsIEhlbHZldGljYSwgc2Fucy1zZXJpZik8L3A+CiAgICA8cCBzdHlsZT0iZm9udC1mYW1pbHk6IHNhbnMt c2VyaWYiPmhlbGxvIHdvcmxkIChzYW5zLXNlcmlmKTwvcD4KICAgIDxwIHN0eWxlPSJmb250LWZhbWlseTogc2VyaWYiPmhlbG xvIHdvcmxkIChzZXJpZik8L3A+CjwvYm9keT4=

Modified by cor-el

more options

Checked the font inspector, the five paragraphs you sent render to Bookerly, NimbusSansRegular, NimbusSansRegular, Ubuntu, Bookerly respectively.

What I don't understand is the following (for the different example lines): 1) Arial - a sans-serif font - instead of falling back to the sans-serif default (that would be Ubuntu) it falls back to the serif default (in this case Bookerly). 2) Helvetica - another sans-serif - falls back to NimbusSansRegular instead of the default sans-serif Ubuntu. I could understand this, if Arial would also resolve to NimbusSansRegular (because they both match Nimbus via fontconfig), but as you can see they are displayed differently. 3) Since Arial and Helvetica are non existent on the machine, it should revert to the third option (sans-serif). But it still uses NimbusSansRegular for some reason. I don't see the logic behind this choice. 4) and 5) are displayed as expected

The goal is that if Firefox cannot find the font (Arial, Helvetica etc) it falls back to the correct serif, sans-serif one defined by fontconfig.

more options

I get this and that matches what I posted above.

fc-match Arial => "Liberation Sans" "Regular"
fc-match Helvetica => "Nimbus Sans L" "Regular"
fc-match sans-serif => "DejaVu Sans" "Book"
fc-match serif => "Liberation Serif" "Regular"
more options

Do you think this is a bug, or a correct default behavior? In the latter case is there any workaround?