17

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.

  • I think Firefox uses the default font for these things. You can edit the default font from Firefox preferences. Is this what you asked for? – nitishch Sep 1 '15 at 17:11
  • It still didn't change things. The fonts look great when I don't allow sites to choose their own but this messes up some icons. Any other suggestions? – user241948 Sep 1 '15 at 17:21
  • This is just with Firefox and not a system problem? – nitishch Sep 1 '15 at 17:24
  • Right. Everything looks great on chromium – user241948 Sep 1 '15 at 17:25
  • Probably you have the bitmap version of Helvetica installed – contemplator Sep 2 '15 at 17:33
27

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>
  • 1
    If I could, I would have upvoted this 50 times. Thanks for such an elegant solution (still usable in 2016 using Debian Jessie and GNOME)!!! – maulinglawns Dec 23 '16 at 16:48
  • 1
    Still working by 2017, Debian Jessie and KDE. Thanks! – kR105 Apr 27 '17 at 20:19
  • 2
    Still working in 2017 on Stretch too! – natebc Jun 5 '17 at 13:27
6

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
  • 1
    I just ran this without changing any of the answers, and it improved fonts instantly! (maybe dist upgrade caused some problems) – Jürgen Strobel Jul 5 '17 at 4:23
1

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!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.