MikeyP.com MikeyP.com

Improving Debian/Ubuntu Fonts

I shouldn't say "improving", as font settings are very subjective. However, compared to Windows and OS X, the default font settings in most recent Debian-based Linux distros (such as Ubuntu) just look wrong to me. I've found two main reasons for this:

  1. Most Debian Xorg configurations default to 100 dpi
  2. Debian font hinting typically uses the Freetype "Native" hinter

On the dpi front, Windows defaults to 96 dpi instead of 100 dpi, which seems to be where many fonts look their best. To change the dpi on Debian-based Xorg configs, edit the file /etc/X11/xinit/xserverrc and change the exec line to read:


exec /usr/bin/X11/X -dpi 96 -nolisten tcp

As for Freetype hinting, there are two font hinting options available: "native" and "autohinter." I'm pretty confused as to why there are two options, but it appears to be patent-related (see http://www.freetype.org/). In any case, I think that the "autohinter" setting looks much nicer. To change it in a Debian-based distro, run:


dpkg-reconfigure fontconfig-config

Follow the prompts to choose "autohinter", "automatic" subpixel rendering, and "no" to default bitmapped fonts.

After making the above changes, restart X (ctrl-alt-backspace).

Here is a before and after screen cap of the Xfce menu, with subpixel rendering off. Notice the lowercase "m" in the examples. And believe me, the "after" results look superb on a good LCD screen with subpixel rendering.

Native Hinter 100 dpi Autohinter 96 dpi

Note 1: Gnome and KDE both override the dpi setting in Xorg. Despite setting Gnome to use 96 dpi, the fonts still look wrong (using my lowercase "m" test).

Note 2: Be sure to play with the hinting level. You can usually adjust this in your window manager. I set the hinting level to "full".

Read more stories like this one...


I just upgraded to Ubuntu 7.04 and the font problem is gone.

posted by: Brian | URL: