Debian Fonts – How to Improve Font Rendering in Firefox

debianfirefoxfonts

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

enter image description here

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

Best Answer

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>
Related Question