Linux Know-How provides a collection of introductory texts on often needed Linux skills.

Installing TrueType Fonts

Some distributions come with a TrueType font server but no (or a limited choice of) TrueType fonts. You can install your own TrueType fonts though. Here is how I did it manually. Mandrake includes a GUI utility to transfer you MS Windows fonts to Linux, so you don't have to bother with the procedure below.

    1. From under K-menu (KDE), select "System"-"Font Manager" (or equivalent) and note what fonts you have installed.

    2. On the command line, check if the "free type" font server is installed:

rpm -q freetype

This queries (option "q") the rpm package manager for the package "freetype". If the package is installed, go to next step. If "freetype" is not installed, install it now from your distribution CD. "freetype" was installed on my system after a "full" RH installation.

    1. As root, make a directory that is to hold your TrueType fonts:

cd /usr/X11R6/lib/X11/fonts

mkdir TrueType

This directory is referred to in the configuration file /etc/X11/XF86Config so make sure that the name of the directory is exactly as shown. If you would like to name the directory differently, you have to edit /etc/X11/XF86Config and make appropriate adjustments. My "default installation" RedHat contained such a line:

FontPath "/usr/X11R6/lib/X11/fonts/TrueType"

    1. As root, copy your *.ttf files from the original location to the TrueType font directory that you just created. I took some TrueType from my MS Windows partition, you may need to use a different source location:

cd /usr/X11R6/lib/X11/fonts/TrueType

cp /mnt/dos_hda1/windows/fonts/my_private_fonts/*.ttf .

Before copying any fonts, make sure that it does not violate your licence agreement.

    1. As root, run the following commands:

cd /usr/X11R6/lib/X11/fonts/TrueType

ttmkfdir > fonts.dir

cp fonts.dir fonts.scale

    1. Close all X-windows applications and log out from X-windows.

    2. As root, restart your X-font server (or reboot your computer):

/etc/rc.d/init.d/xfs stop

/etc/rc.d/init.d/xfs start

    1. Log back onto your KDE, and from under K-menu, select "System"-"Font Manager" to see if the fonts installed correctly.

This parts is based on:

Last Update: 2010-12-16