
Contents
1. Introduction
2. pfa / pfb fonts
3. TTF fonts
4. Unicode peculiarities
5. Contact


1. Introduction
---------------
AbiWord limits the fonts it makes available to the user to those
located in /usr/local/AbiSuite/fonts directory (unless you chose
different installation location) and in the locale-specific sub-
directories of this directory (see the UnixLocale.txt document).
A standard set of fonts is provided with AbiWord and these are
located in this directory. If you wish to make an additional font
available to AbiWord, you need to do the following:

(1) Place the font into the fonts directory (or symlink it there,
    if it is locate elsewhere on your machine).

(2) Update the fonts.dir file. 

The detailed procedure for pfa/pfb fonts and for ttf fonts is
slightly different and is descirbed below.


2. pfa / pfb fonts
------------------
If your font came with a vendor provided afm file, you should copy
or symlink it alongside the pfa/pfb file. If not AW will 
generate the afm file automatically, but using a vendor provided
afm file is preferable.

To update the fonts.dir file, you should add an entry for the new
font into fonts.scale and then either run mkfontdir, or add exactly
the same to fonts.dir and increase the font count at the very top
of the file accordingly. Your fonts probably came with a sample
fonts.dir or fonts.scale file, but if you do not know what the entry
in the fonts.scale should be, you can generate it using the utility
ttmkfdir.

If you are installing a font for a different encoding than iso8859-1,
Things are slightly more complicated. When adding the entry for the 
font to fonts.scale (and fonts.dir) make sure that the last two 
parts of the line separated by a dash are set to adobe-fontspecific.
Then you have to create a file called fonts.alias in where you alias
the font to the actual encoding it is for. For instance if your font
called BLAH is for iso8859-8, the entry in fonts.scale/fonts.dir 
should look something like:

blah.pfa -...-BLAH-.........-adobe-fontspecific

(the dots stand for whatever makes up your specific entry). The 
fonts.alias file should then contain the following line:

-...-BLAH-.........-iso8859-8 -...-BLAH-.........-adobe-fontspecific

Also, if the font name contains spaces, both parts of the alias line 
need to be enclosed in double quotes:

"-...-BLAH-.........-iso8858-8" "-...-BLAH-.........-adobe-fontspecific"


3. TTF fonts
------------
First of all, your font server must support ttf fonts. Then, just
as in the case of pfa fonts, you need to add an entry into 
fonts.scale, and you should use the same programme (ttmkfdir) to
generate the entry from the font itself. Note, that in the case of
ttf fonts, the utility will generate multiple entries, for a number
of diferent encodings the font supports, just disregard those you 
do not need. Once fonts.scale is updated, run mkfontdir.

IMPORTANT: if you decide to update a ttf font that you have used
with AbiWord previously, you will need to remove some support files
that AbiWord generated. If your font is called myfont.ttf, look for
files myfont.afm, myfont.u2g and myfont.t42 and delete them, then
install the updated ttf font; AbiWord will generate the support files
the first time you use the font.


4. Unicode peculiarities
------------------------
If are using a UTF-8 locale, you need to install unicode fonts. To
make XFree86 to treat a font as a Unicode font, you need to specify
the encoding in the XLFD (the entry in the fonts.dir/fonts.scale file) 
as iso10646-1. To see if your font is treated as a Unicode font run 
`xlsfonts -ll -fn font_name'. This will dump out lot of information
about your font, and somewhere among it should be values min_byte1 
and max_byte1; if both of these are 0, then your font is being treated
as 8-bit only font. In my experience it is not currently possible to 
use a pfa Type 1 or 2 font under XFree86 4.0.2 as a proper Unicode 
font; if you know how to make XFree treat a pfa font as a Unicode font, 
please let me know so that I can update this document.

5. Contact
----------
This file is part of AbiWord and was created by
<tomas@frydrych.uklinux.net>.
