Fixing Blurry Debian Fonts

Why does my Web site look ugly in Icewesel compared to on my iPad?

Retina Display?

When I mentioned to a friend a few months ago that the fonts look so much better on my iPad, he said my iPad has a retina display.

As I am currently mainly using my Home Server as a desktop machine, and am doing most of my Web design coding on my iPad (bought an Apple Wireless Keyboard just for this), a lot of my screen time is spent on my server.

I use 3 different fonts on this site. Swanky and Moo Moo for the headings and footer (poster, date) because it looked closest to my "neat" handwriting, Delius for the introductory description of each page because it looked good (and readable for short sections), and Muli for everything else (except pre-formatted <code> & <samp> blocks) because, to my eyes, it looked the best sans-serif font.

Google to the Rescue

A Google search for debian firefox font quality brought me to Improve Font Rendering in Debian.

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

After copying and pasting the XML for subpixel-hinting and font-smoothing into a ~/.fonts.conf file, I logged out, logged back in, and restarting Iceweasel.

I wasn't expecting much, but the litmus test was going to be italic text on this site because previously the Muli italic just looked awfully blurry using Iceweasel.

Lo and behold, the italic text looked a lot less noisy/blurry. It is too early to tell if the other fonts are as "smooth" as on my iPad because my eyes are a bit blurry themselves at the moment.