Using True Type Fonts with XFSTT

Author: Andy Bradford
Revised: December 2 1999

This step-by-step guide will instruct you how to properly configure and install xfstt to allow the use of True Type Fonts in your linux environment. It has been tested on OpenLinux 2.3.

1. Preparation
1.1 Download and locate fonts

The first thing that must be done is to download a copy of xfstt. There is an RPM available in the contrib directory on the CalderaSystems ftp site found here: Contrib on but if you prefer compiling from source, then you should get the tarball from xfstt on metalab then compile and install it.

Compiling this package will not be covered in this document.
To install the RPM you must change to the directory where you downloaded the RPM and then type

rpm -ivh xfstt-1.0-1.i386.rpm

This will install the program and create the directory structure for the location where you will place the TTF. You should then copy all the TTF that you want to use into /usr/share/fonts/truetype which is the directory that xfstt looks for when starting up.

2. Configuring system to use xfstt
2.1 Modify /etc/rc.d/rc.local

The first thing that you should do after copying the TTF to the proper directory is make a few changes to some configuration files. The first one that we should change is /etc/rc.d/rc.local by simply appending the following to the file:

if ! ps auxw | grep xfstt | grep -v grep; then
        /usr/X11R6/bin/xfstt --sync
        /usr/X11R6/bin/xfstt --res 120 --daemon

This will cause xfstt to start up at boot time before your X server starts and provides the fonts to the X server via port 7101.

2.2 Change /etc/X11/kdm/Xservers

To take advantage of the fonts provided by the font server we can add a few options to the Xservers file in /etc/X11/kdm (only if you are using kdm) that will enhance the fonts in X. These options are the -dpi and -gamma settings.

Much of this can be found in the de-uglification document.
You should have something like this:

:0 local /usr/X11R6/bin/X -dpi 100 -gamma 1.6

The gamma setting may or may not be valid for your X server that you are running but won't hurt if it's incorrect.

2.3 Modify /etc/XF86Config

In addition, we also need to instruct X to know where to find the new fonts on the xfstt port so we need to edit /etc/XF86Config and make one change. In the file, the first section of configuration options is labeled "Files" and it describes which fonts are available for X to use. We must add another FontPath to this section which uses that port "unix/:7101" thus:

Section "Files"
   FontPath "unix/:7101"

Save the changes and you should now have a properly configured X that will use the TTF provided by XFSTT. If you want to start using TTF immediately you will have to first start xfstt and then restart your X server. To start xfstt type in the commands as those that we entered in rc.local.

# /usr/X11R6/bin/xfstt --sync
# /usr/X11R6/bin/xfstt --res 120 --daemon

Then restart your X server.

3. Problems and troubleshooting

If you run into problem or X won't startup after you have made these changes then there is some misconfiguration. Recheck all the paths and the command that you have typed. If you are still unable to get it working edit /etc/XF86Config once more and place a '#' in front of the new FontPath line that we added. This will cause it to be commented out and thus ignored when X is started up. You might also consider joining a nice linux related mailing list to discuss possible solutions.

searchSearch Index