[HowTo] fix badly rendered fonts in Firefox and Thunderbird content and more

Difficulty: ★★★☆☆

Sometimes certain web pages in Firefox (FF) and html messages in Thunderbird (TB) the text can appear thin, ragged, badly rendered and hard to read. Even if you install the fonts the content uses onto your system it still appears the same. It seems that it’s necessary to disable bitmap font display for these fonts to avoid the ugliness in some web pages and emails. This HowTo is for content using the Calibri font in FF and TB and can be replaced with any compatible font.

This may also help font rendering in other applications like LibreOffice Writer under some circumstances.

  1. Create or edit ~/.config/fontconfig/conf.d/20-no-embedded.conf
    Note: Add the sub directory conf.d and create the file 20-no-embedded.conf in there.

  2. Add these rows to the file 20-no-embedded.conf :

    <match target="font">
      <test qual="any" name="family">
        <string>Calibri</string>
      </test>
      <edit name="embeddedbitmap">
        <bool>false</bool>
      </edit>
    </match>
    
  3. Restart your session and enjoy better looking content.

You can also disable embedded bitmap for all fonts, see link to Arch Wiki below.

Sources and more information:

5 Likes

Would this also fix the rendering of these fonts in LibreOffice?

Note that installing Calibri is not required, that was just the font the guy was using. The above can be done with any compatible font.

Thanks Yochanan, adjusted the HowTo removing the font requirement.

Only checked FF and TB where I had the issue, have not experienced any rendering problems in LibreOffice on my system.

Can’t speak for all fonts in the Microsoft AUR font packages, but Arial/Calibri definitely looks terrible at moderate/low zoom.

Did a quick test and yes, it seems to work in LO Writer. Made a sample docx file in MS Word 365 with Calibri font and there is a difference (see before/after below).

before_calibri_disable_bitmap_render

after_calibri_disable_bitmap_render

1 Like

Is it possible I don’t have ~/.config/fontconfig/conf.d/ directory on Manjaro?

Yes is possible

First post actually mentions Create which I also had to do, as I did not have it.

Yes, I read that, I assumed you meant creating the file. I am asking about the folders.
I do have ~/.config/ but no /fontconfig/ under it. So should I create /fontconfig/ and /conf.d/ under it?

yes indeed - you need to create the folder structure so the configuration file is where the system is looking for it being present.

3 Likes

Out of interest, when would you want bitmap fonts? I’ve just globally disabled them and everything seems fine.

1 Like

Thanks, adjusted the HowTo to clarify that.

1 Like

Yes I wonder about that too, added info that you can in the HowTo, thanks. My problem with ugly fonts was solved by disabling as described above.