Musings about Coding, Business and other Geek Stuff Live and Direct from somewhere on the planet
January 13, 2003
Great looking fonts in Linux


My main pet peave with Linux guis is fonts. Some people might say that nice fonts are just window dressing, but for me bad font rendering gives me fuzzy eyes, headaches and encourages me to excess drinking. I've finally figured out how to get excellent fonts in nearly all my programs. (See above screenshot)
The guys at Freetype have done an excellent job at bringing font excellence to the open source world. The main problem is that fonts and the languages of fonts are still a bit of a mystery to many, so many of the default builds of freetype have been terrible. Most notably which ever version they've linked into the Linux binaries for OpenOffice.
KDE3.1 and Gnome 2.2 have made big strides in improving the default installations and builds of Freetype and have excellent configuration tools shipped with them. This makes it easy to have sub pixel rendering on lcd's for example.
The latest build of freetype 2.1.3 has taken font rendering to a whole new level and I think its safe to say that its better now than most commercial renderers including Windows XP and Mac OS/X.
As with any great Open Source package there are people out there who have played around and tuned the source code. For freetype the ultimate patch that everyone should get is ft-smooth from David Chester. David has really done great work in finetuning the rendering of freetype. The file contains a binary version that you can copy ontop of you existing freetype-2.1.3. This works great, but I'd recommend grabbing the source and patching it with his patches instead. In particular if you're going to be building anything that uses freetype (such as KDE3.1).
He has different versions of the patch, depending on your preferences. View the example screenshots on his site to make up your mind. I used ft-all-together.diff.
If you're unfamiliar with patching source its really quite simple. First you cd into the freetype source directory. (Make sure its freetype-2.1.3)
patch -p0 <../ft-smooth-20021210/ft-all-together.diff
After this you can just build it like normal.
David also figured out how to get OpenOffice to use his patched version. Simply set the LD_PRELOAD environment variable with the full path to your freetype shared library prior to running open office.
For me the easiest way to do this was to edit the soffice script file and adding the following line up towards the top:
# Freetype font hack
export LD_PRELOAD=/usr/lib/libfreetype.so.6

Enjoy.

Posted by pelleb at January 13, 2003 12:33 PM
This entry was posted in the following Categories: Open Source
Comments

That screenshot looks impresive. How does that translucent menu performs on a 700MHz laptop?

Posted by: Ramsés Morales on January 13, 2003 05:11 PM

Hola Ramsés,
Not bad actually. It uses Mosfet's Liquid engine for KDE which is quite fast http://www.mosfet.org/liquid.html
-P

Posted by: Pelle on January 13, 2003 06:13 PM
Post a comment
Name:


Email Address:


URL:


Comments:


Remember info?