Saturday, December 15, 2007

Better TTF fonts for LCD devices

A small follow-up to my last post -- because after you've installed your fonts, you'd probably like them to look good.

note: In some countries, the use of hinting is covered by patents -- which is why some distributions don't ship this functionality by default (prefering instead to use an auto-hinter included within the Freetype 2.x code specifically designed to completely ignore the TrueType bytecode instructions) -- still, you should use caution when modifying a production system -- caveat emptor.

First, you need to make sure you are actually using the native renderer, rather than the auto-hinter for your fonts -- in Ubuntu you can do this by opening a Terminal and typing:

sudo dpkg-reconfigure fontconfig-config

On the first screen, you need to select 'native' rather than 'autohinter' -- you can safely leave the other screens as their default values.

Second, you'll need to change your theme to use the better hinting -- you can do this on Ubuntu in the Font preferences from: System > Preferences > Appearance and select Fonts tab.

On the first screen, select the 'Details' button in the bottom right-hand-corner -- which will take you to a more detailed menu where you can customise your font and rendering preferences -- the key options to set here are:

Smoothing to Subpixel (LCDs),
Hinting to Slight
Subpixel Order to RGB. (Should be the default already)

At this point, instead of having something like:



You'll have:



Which, I think you'll agree -- looks much better (and is much easier to read, too)