Font De-Uglification for AbiWord and Dia

By Akos Polster, akos@pipacs.com
Last modified: $Date: 2002/05/09 11:08:48 $

before after
Before... After!

Welcome. On this page, I present a quick hack to make two key Gnome applications, AbiWord and Dia, looking better on screen. In the original Ximian Gnome setup, these applications use to the very free, but not very nice URW fonts. If you happen to have something better, namely the not-so-free, but beautifully rendered Microsoft core fonts (Arial, Courier New and Times New Roman), here are the steps for making them accessible.

This hack was only tested on Red Hat Linux 7.1 with Ximian Gnome 1.4.

0. Prerequisites

In this document, I assume that you have

  1. A running X font server with Adobe Type 1 and TrueType font support
  2. An X11 configuration where the font path contains a reference to the font server
  3. URW Type 1 fonts installed in /usr/share/fonts/default/Type1

1. Install the Microsoft fonts

These fonts are standard on Windows, they are usually located in c:\windows\fonts. Alternatively, they can be downloaded from download.microsoft.com. Once you have the fonts, copy them to /usr/share/fonts/truetype. This directory doesn't exist by default, so you have to create it first. We need at least the following font files here:

The more you have the better. The next step is to create the font catalog. Use the following commands:

cd /usr/share/fonts/truetype
ttmkfdir > fonts.dir
cp fonts.dir fonts.scale

2. Configure Dia

Dia expects the font names to follow the URW naming conventions, which means we have to cheat by creating aliases to the same font files we created previously. (Ok, technically these are not X font aliases, but completely new fonts, rendered from the same font files. I just couldn't make Dia work with true aliases.)

We accomplish this by creating a new font directory with no font files, but with a catalog referencing to font files in other directories:

  1. Download dia-fonts.dir from this site
  2. mkdir /usr/share/fonts/dia
    cp dia-fonts.dir /usr/share/fonts/dia/fonts.dir
    cp dia-fonts.dir /usr/share/fonts/dia/fonts.scale

3. Configure AbiWord

Note: This procedure was tested with AbiWord 0.99.3.

AbiWord expects to find its fonts in /usr/share/AbiSuite/fonts. This directory exists already, but we are going to replace it with the one containing our TrueType fonts:

mv /usr/share/AbiSuite/fonts /usr/share/AbiSuite/fonts.org
cd /usr/share/AbiSuite/bin
./ttfadmin.sh /usr/share/fonts/truetype
ln -s /usr/share/fonts/truetype /usr/share/AbiSuite/fonts

4. Configure the X font server

The X font server configuration file is called config, located in /etc/X11/fs. Only the "catalogue" entry has to be changed. The goal is to remove all references to URW fonts, and to add ours.

This is the change I recommend:

catalogue = /usr/X11R6/lib/X11/fonts/misc:unscaled,
	/usr/X11R6/lib/X11/fonts/75dpi:unscaled,
	/usr/share/fonts/truetype,
	/usr/share/fonts/dia

Finally, restart the font server and the X Window server:

init 3
service xfs restart
init 5

5. Antialiasing

The fonts on the "After" screenshot are, besides being TrueType, antialiased. How did I achieve this is a long story, but it is all explained on the Gdkxft home page. < back