Installing TrueType Fonts

Note: Red Hat Linux 8.0 and later make use of the Xft font system. To make TrueType fonts available to your system with Red Hat Linux 8.0 and later:

  1. Create a ~/.fonts directory.
  2. Copy the TrueType files to your ~/.fonts directory.
  3. Verify that the fonts are available to your system with the fc-list command.

To install Microsoft's TrueType core fonts on Linux, visit this link.

For systems and legacy applications using xfs, you may use the following instructions, most of which were gathered from http://www.mandrakeuser.org/docs/xwin/xfont.html.

1. Become the root user.
/bin/su -

2. Create the TrueType font directory. The TrueType font directory must have 755 permissions.
mkdir -m 755 /usr/X11R6/lib/X11/fonts/TrueType

3. Copy all your TrueType fonts (ending in extension .ttf or .TTF) to /usr/X11R6/lib/X11/fonts/TrueType

4. Make sure that all font file names are lowercase and contain no spaces. To convert your uppercase files to lowercase, you may use one of these methods:

Method 1:
cd /usr/X11R6/lib/X11/fonts/TrueType

for i in *

do
j=`echo $i | awk '{print tolower($0)}'`
mv $i $j
done

Method 2:
cd /usr/X11R6/lib/X11/fonts/TrueType

for uppercase in `ls`

do
for lowercase in `ls $uppercase|tr [A-Z] [a-z]`
do
mv $uppercase $lowercase 2>/dev/null
done
done

5. Make sure all font files have 644 permissions.
chmod 644 *.ttf

6. ttmkfdir > fonts.scale

7. mkfontdir

8. Add your TrueType font directory to the xfs configuration file /etc/X11/fs/config.
/usr/sbin/chkfontpath --add `pwd`

9. xset fp rehash

10. service xfs restart

11. Restart the X Window System in order for the new fonts to take effect.

Back to brandonhutchinson.com.

Last modified: 01/26/2004