The purpose of this document
The purpose of this document is to get you acquainted quickly with fonts in Linux and help you use
True type fonts ("One of the few things Windows is good for").This document does not hope to help
you Understand Fonts under X.There is an excellent Font-HOWTO and a mini HOWTO.Please refer to them
for further info.This document itself derives many ideas from them.
The first place to look for any font related problems is your XFree86 Config file, usually at
/etc/X11/XF86Config(XF86Config-4 in case X 4.x).Goto to the section marked "Files".You should see
if your font needs are satisfied by xfs.
The FontPath tells X where to look for fonts to render text.The order is very important.When ever an
application asks for a font X just searches the FontPath and the first font that matches the
criteria is rendered.
Redhat from 5.x onwards started shipping with xfs(x font server) that handles all the Font needs.The
FontPath section now looks like
For RedHat 7.x
and Redhat 5.x
The service is given via Unix Domain socket and the number specifies the port in which the server is
running.xfs has its own configaration file, located at /etc/X11/fs/config.The location of fonts is
given in this file.
Adding True type Fonts
Most of the web pages out there on the web are written for Windows users(alas) and they use True
type fonts which unfortunately are not supported naturally by X.So tweaking becomes necessary.
True type fonts are scalable so they look great at any size.Follow these steps and you'll be using
true type fonts in your linux system
Copy the true type fonts from a CD or floppy or from a Windows partion to a suitable place
Issue the following commands
ttmkfdir > fonts.scale
Now you should have 2 files fonts.dir and fonts.scale in that directory.
Now the final step is to make these fonts available to X.If you are not using xfs and X serves your
fonts directly edit XF86Config and add the path to the font dircetory in the files section, as in
But if you are using xfs(as mostly thats going to be the case) edit the file /etc/X11/fs/config and
find the section catalogue which would look something like
Now add the directory containing the truetype fonts
catalogue = /usr/X11R6/lib/X11/fonts/ttf,
Another simple strategey would be to simply place symbolic links to true type fonts in windows
partitions without actually having to copy them.And then follow the usual steps to create
fonts.scale and fonts.dir.Obviously you should have Windows partition mounted at startup.Mandrake users can use the XFontDrake, a nice, pretty GUI tool for font management, to set up fonts.
Thats it.Restart X and You should be able to use True type fonts under X Window.
More info can be had from
The Font Howto
XFree86 Font Deuglification Mini HOWTO
Understanding fonts.scale, fonts.alias,etc.,