ralphm.net

ralphm's blog

Thursday, 10 October 2002

Anti aliased fonts in Mozilla/Galeon

I think I have been staring at my browser windows for too long now, because I noticed how ugly some fonts are while surfing. So I went googling to see if there is any way to let my browser show anti aliased fonts. And there are several.

Currently I use Galeon as my main browser. Its rendering engine, gecko, is borrowed from the Mozilla project. I found a page on enabling TrueType fonts in mozilla. It just takes the FreeType2 library and displays TrueType fonts itself, anti aliased. With some hacking of my user.js I got it working in mozilla. Some extra hacking in the user.js file was nescessary to alter the basic font setting, because the new 'mozilla' fonts don't show up in the UI. The idea is to look at about:config in mozilla and copy over the font settings to the user.js of galeon.

I also found some other pages on using Xft with mozilla which should be the better alternative. It uses XRender for rendering the fonts and this is transparent to applications (that support Xft of course). KDE and Gnome2 have support for this too, but I haven't tried that out yet. There are some experimental builds for using Xft with mozilla, but as far as I know they are currently only for RedHat. I run FreeBSD myself, so that's no real help. I think I wait until Xft support is in the main mozilla tree.