Timur Izhbulatov — Independent Electronic Music

How to fix font rendering in Firefox 3.5 on Ubuntu 9.04

Sat, 02 May 2009 06:32:00 in Tech stuff | permalink

firefox-3.5 font-hinting font-rendering jaunty mozilla-weave ubuntu

Yesterday I set up a fresh desktop with Ubuntu 9.04 (Jaunty Jackalope). One of the most pleasant features is Firefox 3.5 beta (Shiretoko) available out of the box, which is important for me since I use Mozilla Weave to sync my profiles. The problem is that Firefox 3.5 doesn't seem to use font hinting and therefore looks ugly while the default version (3.0) is OK.

After some googling I found out that 3.5 doesn't use GNOME font settings and relies on fontconfig.

Font configuration is stored in /etc/fonts/conf.d/[0-9][0-9]*.conf files. By convention, config files starting with 10 through 19 control font rendering (see /etc/fonts/conf.d/README) and, in fact, are symlinks to the corresponding files in the /etc/fonts/conf.avail directory.

My experiments have shown that it is enough to disable the 10-hinting-slight.conf symlink by removing or just renaming it:

sudo mv /etc/fonts/conf.d/10-hinting-slight.conf{,.disabled}
sudo dpkg-reconfigure fontconfig