# How Can I Improve the Font Rendering In Firefox

Unix & Linux Asked by user241948 on January 3, 2022

My font rendering in Firefox looks terrible on pages such as facebook.com and twitter.com:

I’m running Debian 8 and fiddling with hardware acceleration, and it doesn’t seem to work.

This won't help many people, but ...

For me it was some ancient Adobe.pfb files in my .fonts directory. Specifically Helvetica.pfb .

If you have Adobe Postscript files from the 90's laying about, have a look with:

fc-match -s Helvetica | grep -i Helvetica


and see if anything lurks. I 100% would have expected @Perlence 's answer to fix this, but apparently .PFB is an exception. I don't see this problem in Chromium-based browsers, so maybe Firefox is handling it?

Anyway, the good news is as soon as I removed it, I was able to switch back to my test tab (archive.org) and as soon as Firefox reloaded the DOM it was perfect. In previous iterations I quit Firefox, logged out of my X11 session, rebuilt the font cache, etc. but none of that was ultimately needed.

See here for a before and after for identification/comparison:

Answered by Bill McGonigle on January 3, 2022

I have tried the suggestions above with Firefox 75 and KDE 5.6 (Arch based Antergos linux) with no success or only slight improvement. Only after changing the Firefox font settings to Fira Sans and the fonts in Firefox gui (tabs, menus, etc) finally started to look sharp, almost as good as in Chromium based browsers. I could not replicate this with any other font no matter how I've set hinting and aliasing.

Menu -> Preferences -> Language and Appearance section, and there I changed teh Default font to Fira Sans. You can play a bit more with the Advance section. You can try Fira Mono as monotype font etc.

Answered by msam on January 3, 2022

These sites use Helvetica as their font. On most Debian systems it's not an outline font, but raster one. You can disable bitmapped fonts as the last stage of font configuration dialog:

\$ dpkg-reconfigure fontconfig-config


Answered by Perlence on January 3, 2022

I've improved mine these days using fontconfig-infinality. Looks great!

The first topic of this forum shows how to do it. Do not use the first method of the link(compilation), use the deb files below it. Install with

dpkg -i *.deb


and then

bash /etc/fonts/infinality/infctl.sh setstyle


choose option 2 (infinality)

DONE!

Answered by user131378 on January 3, 2022

I've had this issue for ages, maybe it's time to do something about it!

It comes done to ClearType, Microsoft and patents from what I read. Most *nix distro's disable any patent protected font rendering by default.

Read about Debian and fonts here, you want Subpixel-hinting and Font-smoothing section.

There's a config file on that page but I will add here for future reference. Create a file called .fonts.conf in your home directory, and add the following:

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
<match target="font">
<edit mode="assign" name="rgba">
<const>rgb</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hinting">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="hintstyle">
<const>hintslight</const>
</edit>
</match>
<match target="font">
<edit mode="assign" name="antialias">
<bool>true</bool>
</edit>
</match>
<match target="font">
<edit mode="assign" name="lcdfilter">
<const>lcddefault</const>
</edit>
</match>
</fontconfig>


Answered by gwillie on January 3, 2022

## Related Questions

### Bash in Ubuntu WSL requires restart to initialize pyenv

2  Asked on February 4, 2021 by heniatha

### Viewing (monitoring) line status of a serial port

1  Asked on February 4, 2021 by anton-samsonov

### how to pass multiple commands to sqlite3 in a one liner shell command

3  Asked on February 4, 2021 by kenn

### How to list files – sorted by both filename and modified date?

1  Asked on February 3, 2021 by gabor-faludi

### virt-manager VM cannot access outside network when VPN is enabled

0  Asked on February 3, 2021 by slybloty

### Specify rootfs mount options

1  Asked on February 3, 2021 by iron-oxidizer

### Awstats on Debian 10 – too small number of visits – options to fix it

0  Asked on February 2, 2021 by youpilat13

### How do you put date and time in a file name?

2  Asked on February 2, 2021 by visc

### PulseAudio module-remap-source blocks shutdown

0  Asked on February 2, 2021 by konrad-hffner

### Permission denied Issue running the ^H command from within VisiData

0  Asked on February 1, 2021 by teepee

### How to copy Ubuntu 18.04 on one partition to a separate hard drive safely without messing up grub?

0  Asked on February 1, 2021

### GroupLatch doesn’t work with Shift for some keys using xkb

0  Asked on February 1, 2021 by r-matveev

### Gedit doesn’t work in Kali 2020

0  Asked on February 1, 2021 by mate-mre

### how to get all applications/windows in the current workspace in the view of the user programmatically ( in python )

0  Asked on January 31, 2021 by user127167

### Trying to Install Linux Alongside Windows 10

2  Asked on January 30, 2021 by jackson-a-cubbage

### How to solve “Error: (converted from warning) Setting LC_CTYPE failed, using “C”?

1  Asked on January 30, 2021 by coding

### EasyTether Internet Disconnect on OpenWRT Router

0  Asked on January 30, 2021 by jack-nelson

### Lost connection to remote computer after starting the DHCP server (Ubuntu 20.04.1)

0  Asked on January 30, 2021 by yehor-pererva

### How to automatically detect and write to usb with variable spaces in its name

1  Asked on January 29, 2021 by flerb

### Issues installing Nvidia drivers in Debian 9

1  Asked on January 29, 2021 by axiomsword

### Ask a Question

Get help from others!