Bad font rendering in Firefox

I try all this. I guess maybe i was a chrome user for to long. Thanks a lot my friend

2 Likes

This worked for me too, thanks (worthwile putting in FAQ?).

1 Like

Certainly, it’s FAQ indeed…I’ll make it

2 Likes

It seems the “conf.avail” directory no longer exists:

ls /etc/fonts
conf.d fonts.conf

…and I found this entry in the Arch-Wiki wich is new to me:

Note: For some desktop environments (such as GNOME and KDE) using the Font Control Panel will automatically create or overwrite the user font configuration file. For these desktop environments, it is best to match your already defined font configurations to get the expected behavior. Also ensure that the desktop locale settings or Regional Settings are supported by the configured fonts, if not the font configuration could be overidden.

…and further this one

Note: Configuration files and directories: ~/.fonts.conf/ , ~/.fonts.conf.d/ and ~/.fontconfig/*.cache-* are deprecated and will not be read by default in the future versions of the package. New paths are $XDG_CONFIG_HOME/fontconfig/fonts.conf , $XDG_CONFIG_HOME/fontconfig/conf.d/NN-name.conf and $XDG_CACHE_HOME/fontconfig/*.cache-* respectively. If using the second location, make sure the naming is valid (where NN is a two digit number like 00 , 10 , or 99 ).

After deleting the (now broken) link @keybreak suggests my font rendering is OK again.

Again there must have been something modified in this fontconfig mess :confused:

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'>
<fontconfig>
 <match target="font">
  <edit mode="assign" name="lcdfilter">
   <const>lcddefault</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>

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:

https://wiki.archlinux.org/index.php/Font_configuration#Disable_bitmap_fonts

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

@Tinymeat

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

@AndreasDimo
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
maybe:

(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.

2 Likes

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