Improving font rendering under Ubuntu

Ubuntu ships FreeType with the bytecode interpreter enabled. This works very well for common typefaces such as Vera, DejaVu, Verdana and Georgia at small sizes but somehow doesn’t for other typefaces and sizes.

After some tinkering, I came up with a configuration that works for me:

  1. Open the Terminal and type sudo dpkg-reconfigure fontconfig-config
  2. Choose Autohinter, Automatic for subpixel rendering, and No for bitmapped fonts.
  3. Under System ? Preferences ? Appearance ? Fonts ? Details, choose Subpixel and Slight.
  4. Restart OpenOffice (including the Quickstarter) and Firefox. These two don’t reflect changes automatically.

We’re making two choices here:

  1. Native bytecode interpreter vs the autohinter. I’m not completely sold on one over the other.
  2. Full vs slight subpixel rendering. Full looks fantastic at small sizes (8-9pt) but terrible when large. Slight is less well defined at small sizes, but acceptably well shaped for larger sizes.

Further reading: Comprehensive Ubuntu Font Configuration Guide (written for Gutsy but also applicable to Intrepid).

Update: Disregard the above. The blurriness at small size gets unbearable after a while. Go back to native interpreter, full subpixel hinting, and setup custom workarounds in your ~/.fonts.conf file. Here’s mine:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
    <match target="font">
        <test qual="any" name="family" compare="eq">
            <!-- Twitter uses Lucida Grande. The site looks terrible without
                 hintslight enabled. -->
            <string>Lucida Grande</string>
        </test>
        <edit name="autohint" mode="assign">
            <bool>true</bool>
        </edit>
        <edit name="hintstyle" mode="assign">
            <const>hintslight</const>
        </edit>
    </match>
</fontconfig>
  • Avatar

    Tushar Burman — Oct 23, 2008 12:45:22 PM — #

    Testing

    Trying this. My initial impression is that system-wide fonts are suddenly darker and larger, as well as a bit blurry. With full hinting, the fonts effectively have no smoothing applied, while with slight, they do and look dirty. Still, we'll see how I like it in extended use.

    • Avatar

      Kiran Jonnalagadda — Oct 23, 2008 5:29:19 PM — #

      I couldn't take the blurriness anymore, so spent some time looking at how to enable slight hinting in specific instances. I've updated the post.

  • Avatar

    srid — Mar 9, 2009 6:35:08 AM — #

    Screenshots?

    How does the result compare?

Leave a Reply

You can respond with a photo by tagging it on Flickr with