TTF font setup notes Rev. 060405
----------------------------------------------------------------------
This directory tree contains various TTF fonts. Credits, original
URLs, and/or documentation files are provided, where they're avail-
able.
These fonts are believed to be either freeware or redistributable.
However, this is not legal advice. The user is responsible for verify-
ing how individual font licenses apply to particular applications and
situations.
To make these fonts available to the system, see the following in-
structions.
Note: These instructions are for Linux users only. Sysadmin-level ex-
perience is recommended.
----------------------------------------------------------------------
1. Put this directory tree in a convenient location. The exact loca-
tion doesn't matter, as long as it's permanent and world-accessi-
ble.
We'll use the string $TOP as a shortcut. Let $TOP stand for the loca-
tion of this directory; i.e., the directory that contains this file.
For example, if you unpacked the original tarball under "/usr/prod",
so that this file is stored in "/usr/prod/ttf", $TOP will be equal to
"/usr/prod/ttf".
----------------------------------------------------------------------
2. The $TOP directory includes multiple subdirectories that contain
TTF files.
For example, the subdirectory $TOP/misc should exist. This subdirec-
tory contains miscellaneous TTF files.
Go to each subdirectory [that contains TTF files] and execute the fol-
lowing commands [inside the subdirectory]:
ln -nsf /usr/X11R6/lib/X11/fonts/encodings .
mkfontscale
mkfontdir
----------------------------------------------------------------------
3. Edit your X configuration file.
Note: If you're running XOrg, the file is "/etc/X11/xorg.conf".
Add one FontPath definition to the file for each of the subdirectories
that you processed in step 2.
FontPath definitions are formatted like this:
FontPath "/usr/prod/ttf/misc/"
Note the trailing slash. I.e., FontPath strings should start with
double-quote slash and end with slash double-quote.
Look for existing FontPath definitions. Add the new definitions in the
same area. The exact order usually isn't critical.
----------------------------------------------------------------------
4. If the "fontconfig" package isn't installed on your system, skip
this part.
For most distros, if "fontconfig" is installed, the following file
should already exist:
/etc/fonts/local.conf
Edit the file. Add a appropriate "
" entry for the $TOP direc-
tory.
"" entries are formatted like this:
/usr/prod/ttf
Replace the directory path shown here with the value of $TOP. Specify
the actual path; i.e., don't use the string "$TOP".
Note: For "" entries, directory paths don't need to end with a
trailing slash.
Look for existing "" entries. Add the new entry after the exist-
ing ones.
When you're done modifying "/etc/fonts/local.conf", save the file and
execute the following command:
fc-cache -fv
----------------------------------------------------------------------
5. Reset X font database.
To reset the X font database, just restart X.
Alternate approach: A restart is the simplest way to proceed. However,
if you prefer, you can use a program named "xset" to avoid the need
for a restart.
The "xset" approach is optional. If you'd like to try this approach
[as opposed to restarting X], the associated commands look like this:
xset fp+ /usr/prod/ttf/bitvera/
xset fp+ /usr/prod/ttf/freefont/
...
xset fp rehash
First, you execute one "xset fp+ /DIR/" command for each of the TTF
subdirectories that you processed in step 2. Note: The pathnames
should end with trailing slashes.
Then, you execute "xset fp rehash".
----------------------------------------------------------------------
6. Listing installed fonts.
There are two main X-window font systems: "fontconfig" and an old X11
font system. At this point, both font systems should know about the
new fonts.
Try the following command:
fc-list | sort | less
This command lists the fonts that the "fontconfig" font system knows
about. The new fonts should be present.
Additionally, try this command:
xwinfonts | less
This command lists the fonts that the old X11 font system knows about.
The new fonts should be present again [but under slightly different
names].
Note: "xwinfonts" is a local script that uses abbreviated X11 font
names. The names are abbreviated to make the output human-readable.
If you'd like to see the official names that the old X11 font system
uses for fonts, execute this command:
xlsfonts | less
Warning: "xlsfonts" may produce a lot of output, since it lists all
variations of every font.
----------------------------------------------------------------------
7. General applications.
At this point, various X applications should know about the new TTF
fonts and be able to use them [for example: The Gimp, Leafpad, Abi-
Word, etc.].
To do a quick test, execute "leafpad". This should bring up a text
editor. Go to the Options menu and use "Font..." to select one of the
new fonts. Enter some text, and it should be displayed using the new
font.
----------------------------------------------------------------------
8. XTerm and TTF fonts.
You can run XTerm using a TTF font. In most cases, TTF fonts don't
work well as XTerm fonts, but there are exceptions. IMHO Luxi Mono is
good for this purpose. Flintstone and Flying Penguin don't work as
well :-)
To try a Luxi Mono XTerm session, execute this command:
xterm -fa LuxiMono -fs 16 &
----------------------------------------------------------------------
9. ImageMagick setup.
ImageMagick TTF configuration requires a special procedure. If you
execute the following command, it should report the location of a
file named "type.xml":
find `Magick-config --prefix` -name type.xml
To make ImageMagick aware of the new TTF fonts, you need to modify the
indicated file. The file format is beyond the scope of this document.
However, a utility script that deals with this issue may be added at a
later date.
Note: If you don't have write access to the "type.xml" file mentioned
above, you can create a personal copy and put it in your home direc-
tory. If you take this approach, the personal copy should be stored
as:
~/.magick/type.xml
For more information, see the ImageMagick documentation.