# Bad font rendering in Firefox

**URL:** <https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428>\
**Category:** Newbie\
**Created:** [April 8, 2021, 4:36pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428 "2021-04-08T16:36:28Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 4:36pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/1 "2021-04-08T16:36:28Z")

</div>

I have bad font rendering in web pages with Firefox. In Chrome everything is OK. I am using plasma.

Any ideas what can i do?

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 8, 2021, 4:41pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/2 "2021-04-08T16:41:24Z")

</div>

It’s not only **Firefox** though, but any program using **fontconfig** …

1. Close browser

2. Enable LCD filter

3. Rebuild font cache

* * *

## Why it happened?

> Starting from FreeType 2.10.3, Arch Linux enables ClearType subpixel rendering by default [[4] ](https://github.com/archlinux/svntogit-packages/commit/68a744d932ddf1d218c687ed89f5742b57385bba).

> When using ClearType subpixel rendering, you should enable the LCD filter, which is designed to reduce colour fringing.

(c) [https://wiki.archlinux.org/index.php/Font\_configuration](https://wiki.archlinux.org/index.php/Font_configuration)

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 4:48pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/3 "2021-04-08T16:48:13Z")

</div>

I have done this. Still the same. Take a look  
 ![Screenshot_2021-04-08 DistroWatch com Put the fun back into computing Use Linux, BSD](https://forum.endeavouros.com/uploads/default/original/3X/9/1/91d97794f9abb8320e93240778d8e621a9635368.png)

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 8, 2021, 4:50pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/4 "2021-04-08T16:50:47Z")

</div>

It’s not clear what exactly you mean by bad rendering, clarify please…  
And can you make side by side screenshot of same page between Firefox and Chrome?

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 4:53pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/5 "2021-04-08T16:53:52Z")

</div>

Chrome  
 ![Screenshot_20210408_195202](https://forum.endeavouros.com/uploads/default/original/3X/b/7/b797a6a2780ab75455da5dfcfb94b2acf321f850.png)

Firefox  
 ![Screenshot_20210408_195328](https://forum.endeavouros.com/uploads/default/original/3X/a/d/adf36d516359813c55fa321fc4a9f682aaec7944.png)

---

<div class="post-metadata">

**Author:** ![Agualusa](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/a/45deac/32.png) [@Agualusa](https://forum.endeavouros.com/u/Agualusa)\
**Post date:** [April 8, 2021, 4:56pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/6 "2021-04-08T16:56:20Z")

</div>

Well it seems normal to me from the screenshot. But I’m interested in this because since I don’t see any issue I might be with that problem since forever 🙂

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 4:58pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/7 "2021-04-08T16:58:19Z")

</div>

I just dont like the rendering of fonts in Firefox compared to Chrome

---

<div class="post-metadata">

**Author:** ![tlmiller76](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tlmiller76/32/96350_2.png) [@tlmiller76](https://forum.endeavouros.com/u/tlmiller76)\
**Post date:** [April 8, 2021, 4:59pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/8 "2021-04-08T16:59:12Z")

</div>

TO ME, the screenshots look like the fonts are rendered the same…

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 8, 2021, 5:00pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/9 "2021-04-08T17:00:05Z")

</div>

There are some differences in how engines render text Chrome’s engine by default renders fonts visually “bolder”, especially on some specific font sizes (some webdevs might choose to mitigate this, most don’t) effect also depends on specific font in use

I’m afraid if that’s what you mean you can’t really “solve” it…

For a test, can you screenshots this page (with hardcoded different fonts than default **Liberation sans** at least for headings), i’d like to see how it renders for you side by side

[https://developer.mozilla.org/en-US/](https://developer.mozilla.org/en-US/)

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 5:06pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/10 "2021-04-08T17:06:01Z")

</div>

Firefox  
 ![Screenshot_20210408_200454](https://forum.endeavouros.com/uploads/default/original/3X/d/c/dc4147013263109b36422969694fba7a79247164.png)

Chrome  
 ![Screenshot_20210408_200516](https://forum.endeavouros.com/uploads/default/original/3X/2/f/2f4481f23f7e9f6cc477add26b8b43a2aee9496f.png)

What is your fonts settings in Firefox by the way? In each category

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 8, 2021, 5:12pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/11 "2021-04-08T17:12:10Z")

</div>

Looks to me like you have zoomed to something other thatn 100% in one of your browsers, that’s not fair…avoid zoom at all costs for quality typographic btw, especially when posting comparison 🙃

> [@AndreasDimo](#):
>
> What is your fonts settings in Firefox by the way? In each category

![image](https://forum.endeavouros.com/uploads/default/original/3X/8/5/8517a881626bc6f618cd57128be23dc2b5e45415.png)

But it doesn’t really matter, because most pages are set to something like Arial and stuff, so it will reset to some values like Liberation sans, if you want to override it, do it with fontconfig:

To know your current values for popular ones, run this in terminal / script:

```bash
for family in serif sans-serif monospace Arial Helvetica Verdana "Times New Roman" "Courier New";
do
    echo -n "$family: "
    fc-match "$family"
done

```

and here’s some relevant info on how to override web’s favorite defaults from Win / Mac, if you want

> **[How To Set Default Fonts and Font Aliases on Linux](https://jichu4n.com/posts/how-to-set-default-fonts-and-font-aliases-on-linux/)**
>
> Font Woes
> It’s fairly straightforward to set the default font used in native apps on a
> modern Linux desktop, or the default fonts used to render web pages in your
> browser of choice.
> 
> But if you’re reading this, you probably know that that’s far from...

> **[The Most Popular Fonts On The Web: A Study](https://jichu4n.com/posts/the-most-popular-fonts-on-the-web-a-study/)**
>
> If you’ve ever worked on a web site, you already know that choosing the right
> fonts is one of the most important aesthetic decisions in the design of a site.
> But, like all aesthetic decisions, it is a highly subjective.
> 
> I decided to try to bring a...

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 8, 2021, 5:27pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/12 "2021-04-08T17:27:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Burschi500](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/burschi500/32/26711_2.png) [@Burschi500](https://forum.endeavouros.com/u/Burschi500)\
**Post date:** [April 8, 2021, 8:07pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/14 "2021-04-08T20:07:18Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 8, 2021, 8:08pm UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/15 "2021-04-08T20:08:05Z")

</div>

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

> [@\[FAQ\] Bad font rendering in Firefox and other programs](https://forum.endeavouros.com/t/faq-bad-font-rendering-in-firefox-and-other-programs/13430):
>
> It’s not only Firefox, but any program using fontconfig… Close your program Enable LCD filter sudo ln -fs /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/ Rebuild font cache fc-cache --force Why it happened? Caused by weird new defaults for fontconfig, maybe it will change in future. Starting from FreeType 2.10.3, Arch Linux enables ClearType subpixel rendering by default [[4] ](https://github.com/archlinux/svntogit-packages/commit/68a744d932ddf1d218c687ed89f5742b57385bba). When using ClearType subpixel rendering, you should enable the LCD fil…

---

<div class="post-metadata">

**Author:** ![Tinymeat](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tinymeat/32/11480_2.png) [@Tinymeat](https://forum.endeavouros.com/u/Tinymeat)\
**Post date:** [April 9, 2021, 7:47am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/16 "2021-04-09T07:47:44Z")

</div>

> [@keybreak](#):
>
> - Enable LCD filter
> 
> ```auto
> ln -s /etc/fonts/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/
> 
> ```

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](https://wiki.archlinux.org/index.php/GNOME) and [KDE](https://wiki.archlinux.org/index.php/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](https://wiki.archlinux.org/index.php/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 😕

---

<div class="post-metadata">

**Author:** ![Tinymeat](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/tinymeat/32/11480_2.png) [@Tinymeat](https://forum.endeavouros.com/u/Tinymeat)\
**Post date:** [April 9, 2021, 8:05am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/17 "2021-04-09T08:05:47Z")

</div>

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

```auto
<?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.

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 9, 2021, 8:34am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/18 "2021-04-09T08:34:43Z")

</div>

> [@Tinymeat](#):
>
> It seems the “conf.avail” directory no longer exists:

> [@Tinymeat](#):
>
> After deleting the (now broken) link @keybreak suggests my font rendering is OK again.

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

> [@Tinymeat](#):
>
> **Note:** For some desktop environments (such as [GNOME](https://wiki.archlinux.org/index.php/GNOME) and [KDE](https://wiki.archlinux.org/index.php/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](https://wiki.archlinux.org/index.php/Locale) settings or _Regional Settings_ are supported by the configured fonts, if not the font configuration could be overidden.

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

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

---

<div class="post-metadata">

**Author:** ![Feakster](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/feakster/32/24784_2.png) [@Feakster](https://forum.endeavouros.com/u/Feakster)\
**Post date:** [April 9, 2021, 8:35am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/19 "2021-04-09T08:35:50Z")

</div>

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](https://wiki.archlinux.org/index.php/Font_configuration#Disable_bitmap_fonts)

```auto
nano ~/.config/fontconfig/conf.d/20-no-embedded.conf

```

```nohighlight
<?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>

```

---

<div class="post-metadata">

**Author:** ![keybreak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/keybreak/32/9257_2.png) [@keybreak](https://forum.endeavouros.com/u/keybreak)\
**Post date:** [April 9, 2021, 8:46am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/20 "2021-04-09T08:46:31Z")

</div>

@Tinymeat

> [@\[FAQ\] Bad font rendering in Firefox and other programs](https://forum.endeavouros.com/t/faq-bad-font-rendering-in-firefox-and-other-programs/13430):
>
> It’s not only Firefox, but any program using fontconfig… Close your program Enable LCD filter sudo ln -fs /usr/share/fontconfig/conf.avail/11-lcdfilter-default.conf /etc/fonts/conf.d/ Rebuild font cache fc-cache --force Why it happened? Caused by weird new defaults for fontconfig, maybe it will change in future. Starting from FreeType 2.10.3, Arch Linux enables ClearType subpixel rendering by default [[4] ](https://github.com/archlinux/svntogit-packages/commit/68a744d932ddf1d218c687ed89f5742b57385bba). When using ClearType subpixel rendering, you should enable the LCD fil…

Updated link now…  
It’s hard to keep up with fontconfig changes 🤣  
Thx 👍

@AndreasDimo  
Try to run new link from FAQ, perhaps it will improve your Firefox situation a bit 🙃

---

<div class="post-metadata">

**Author:** ![AndreasDimo](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/andreasdimo/32/6785_2.png) [@AndreasDimo](https://forum.endeavouros.com/u/AndreasDimo)\
**Post date:** [April 9, 2021, 8:55am UTC](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428/21 "2021-04-09T08:55:22Z")

</div>

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

[Next page](https://forum.endeavouros.com/t/bad-font-rendering-in-firefox/13428.md?page=2)
