Bad font rendering in Firefox

Ooops! I forgot to mention that I had created a file “$XDG_CONFIG_HOME/fontconfig/fonts.conf”
with this content:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'urn:fontconfig:fonts.dtd'>
 <match target="font">
  <edit mode="assign" name="lcdfilter">

This is the solution to my problem.

I don’t think that’s normal, have just tested latest :enos: .iso with XFCE and KDE in VM - it’s still there :thinking:

Yep, that’s the thing - however sometimes de fails to fix all that fontconfig crap :laughing:

P.S. @Tinymeat Dammit, you’re right some update killz /etc/fonts/conf.avail/ :exploding_head:

1 Like

Are any of the problems here related to the use of bitmap fonts? I’ve previously found that the solution in the following link has solved issues around MS founds rendering badly for me:

nano ~/.config/fontconfig/conf.d/20-no-embedded.conf
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "urn:fontconfig:fonts.dtd">
  <match target="font">
    <edit name="embeddedbitmap" mode="assign">


Updated link now…
It’s hard to keep up with fontconfig changes :rofl:
Thx :+1:

Try to run new link from FAQ, perhaps it will improve your Firefox situation a bit :upside_down_face:

1 Like

Can you paste here exactly what to try? I have a little difficult to translate and i am afraid of doing something wrong and mess mt system

3 steps in this post, there were another fontconfig update recently which broken my older solution, so what you have done previously was not working, sorry :woozy_face:

Fear not! :upside_down_face:

1 Like

Dont be sorry. I am thankful for your help

1 Like

i find this google

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste font_r and pause while the list is filtered

(3) Double-click the gfx.font_rendering.cleartype_params.rendering_mode preference and change the value from -1 to 2 and then click OK

You probably need to exit and start Firefox back up again to see any difference.

Example screenshots attached.


And here are the values of gfx.font_rendering.cleartype_params.rendering_mode:

//     -1 or 0 = use default for font & size;
//     4 = Natural;
//     5 = Natural Symmetric

=> Sub-pixel anti-aliasing/positioning

//     1 = aliased;
//     2 = GDI Classic;

=> GDI emulation (whole pixel rendering)

//     3 = GDI Natural Widths;

=> GDI emulation with natural widths (?)

However personally i don’t think 2 = GDI Classic; is a good idea combined with modern ClearType style we’re using on Arch by default (without LCD filter enabled)

Also altering this setting will affect only Firefox obviously :slight_smile:

it is not only in firefox with bad font???

As far as i understand - it depends

  • If problem is caused by fontconfig changes - it’s not only Firefox but any program that use fontconfig directly (many people complained about it because everyone use browser therefore start to identify it as Firefox problem, you can search forum to see all those topics)

  • If it’s something else that is caused by Firefox only, like engine rendering differences - then it’s only Firefox and your advice is very relevant, it’s good idea to experiment with values

Bad font rendering in Firefox:

therefore I only thought it was firefox

1 Like

Where to write this?

So, updated fontconfig solution for enabling LCD filter haven’t improved your situation?

Those are just values for @anon71489565 suggestion for value in (3), i figured it would be useful for people to understand what those values means :slight_smile:

you just write them as a single number in there, for example 2 or 3

All my pages improved in Fire(Water)fox by increasing font to 17 in settings.waterfox

1 Like

So far it doesn’t make a difference to me with or without the “20-no-embedded.conf” file.
For the screenshots I used terminus font 13px:
Bildschirmfoto vom 2021-04-09 11-11-03
Same here:
Bildschirmfoto vom 2021-04-09 11-20-17

As previously mentioned I use only the fonts.conf file in my home directory and not the solution @keybreak recommends. But both solutions are working.

1 Like

Yep, both are fine :+1:
Only difference technically is that one i’ve mentioned enables this LCD filter for all users

1 Like

I don’t even see what’s wrong with the font’s. I don’t notice it?

If you have LCD subpixel rendering enabled all will be fine I suppose. But there can be bad font rendering in web browsers.

Without /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf

Bildschirmfoto vom 2021-04-09 16-44-12

and with activated /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf

Bildschirmfoto vom 2021-04-09 16-45-23

You’ll recognize it if you look closer to the "0"s and "O"s :slightly_smiling_face:

1 Like

Also it’s not really captured on screenshots, mostly it’s noticeable on display itself especially on thinner lines it looks like color shimmering around some letters, if i use this term correctly…

1 Like