Font Micromanagement for Firefox on Linux

A week ago, a reader named Erik contacted me regarding font rendering on Linux with a question (for which I sadly did not have the answer), and some highly interesting news for Linux Firefox users. In short, by supplying a little environment variable when you start up Firefox (also works with Thunderbird), you can instruct Firefox to render fonts using Fontconfig instead of Pango.

The practical benefit is simple: using your .fonts.conf file, you can assert much greater control over the appearance of rendered fonts, most notably by specifying alternative hinting styles for fonts on whatever basis you want, including font family, style, size, you name it.

The fix is simple, and easily reversible. In short, you execute Firefox like this:

export MOZ_DISABLE_PANGO=1 && firefox

Then edit your .fonts.conf file to your heart’s content (I’ve written earlier posts on how to do this, and plenty of information is available elsewhere on the web). Note you will have to restart Firefox to see the effect of your changes; I recommend taking some screenshots to compare the differences if you’re having a difficult time noticing between browser sessions.

Thanks again to Erik for pointing this out! Long live Linux and personal choice!

Leave a Reply