[KLUG Members] fonts

Adam Williams members@kalamazoolinux.org
Wed, 13 Mar 2002 09:26:10 -0500 (EST)


>I spoke to some one at the meeting last night about
>the fonts on my netscape

My solution is to install TrueType fonts from Windows as these are the 
fonts most people expect to find on a machine.  It is a little more 
complicated than installing fonts on a Windows machine as Linux is broken 
into components (one could want to print fonts, but have no GUI installed, 
etc...) but for basic functionality it is pretty simple.

Fonts for the GUI are stored beneath /usr/lib/X11/fonts 
(/usr/X11R6/lib/X11/fonts is the same place via a link) sorted into 
subdirectories by type.  As X is "old" and exists on many platform is 
supports the full range of font types so you'll see a list of about a 
dozen directories.  Many of these font types are "obsolete" but their for 
legacy stuff.  You should also see a "Truetype" directory (case may vary) 
which is where TrueType fonts live (duh!). 

You can list the fonts known to you X server via "xlsfonts".  One should 
to a "xlsfonts | wc -l" to find the number of fonts.  And make sure the 
number goes *UP* after you install more fonts.  One way to tell you 
haven's screwed up.

Truetype fonts are mathmatical descriptions of glyphs vs. most older style 
fonts are bitmaps.  Hence they scale more or less perfectly assuming a 
good font rendering engine.  The font rendering engine is a package known 
as "Freetype".  Check to make sure you have freetype installed (rpm -q 
freetype).  This is by default on every recent distribution I've met.

In the Truetype font directory you'll see *.TTF files (which are the font 
files) as well as the following files: fonts.dir, fonts.scale, ttinfo.dir, 
and  ttname.dir

These last four files contain information about the fonts in the directory 
such as encoding, supported glyphs (characters in the font), how they 
scale, etc...

cd /usr/lib/X11/fonts/Truetype

After you copy in fonts you need to do a "mkfontdir" in the font directory 
as root.  This rebuilds "fonts.dir"

To rebuild "fonts.scale" for Truetype fonts do a "ttmkfdir > fonts.scale"

Log out of X

Restart your font server (if you are using one).  On RedHat this is 
"/etc/rc.d/init.d/xfs restart"

You may need to restart X, "killall -15 X", if you are in runlevel 5.

Log back into X,  do an "xlsfonts | wc -l" to see if more fonts are 
available than before.

* All documentation of this nature is legally required to site/acknowledge 
the Freetype project and Catharon Productions, Inc.