Firefox – Fix Custom Fonts Not Displaying on Websites

firefoxfonts

I've just upgraded to FF 57 and websites that use their own fonts have stopped displaying text.

I know this is a problem others have had, e.g. Firefox doesn't display website text, but the solutions there have not worked. Safe mode does not help either, the problem only goes away if I uncheck the custom fonts option in Preferences.

I have custom fonts installed as well (from TexLive and and a couple more) so I'm thinking that might be the cause.

Any ideas on how to troubleshoot this?

Example from Github:

github no text

Best Answer

This is a combination of a few things: TexLive is installing fonts in a not-so-standard location, and the webpage is requesting a font that Ubuntu's fontconfig package thinks is better fullfilled by one of the TexLive fonts rather than a normal font. Firefox is then told to use the TexLive font for rendering, but it's not allowed to reach it from inside its security sandbox.

The recommended workaround is to set

security.sandbox.content.read_path_whitelist to /usr/local/texlive/

in about:config, and restarting the browser.

This is fixed on a more fundamental level in Firefox 58 and later.

Related Question