Adding Postscript fonts to teTeX 0.4



This page describes the approach I used to incorporate Adobe Futura font into the installation of teTeX 0.4. It's by no means a complete HOWTO and it can contain fatal errors.

Finding the teTeX base directory

First we have to to determine the top of the teTeX data tree. The base directory is stored in the internal teTeX variable $TETEXDIR. I had to set the environment variable with this value (the other possibility is to use the full path notation):

setenv TETEXDIR `kpsexpand '$TETEXDIR'`
for csh or tcsh and
export TETEXDIR=`kpsexpand '$TETEXDIR'`
for sh, bash, zsh and so on.


Creating TeX representations of an AFM font

For every font file font.afm I created a TeX font metric pfnt.tfm, a raw font metric rpfnt.tfm, and a virtual font file pfnt.vf using the coding table 8a.enc. (Note: Without recoding the font one probably can not use accented characters. I'm not quite sure about this though.) The appropriate sequence for Futura font with its font metric in Futura.afm would be

afm2tfm Futura -p $TETEXDIR/texmf/dvips/base/8a.enc -v pfur8a rpfur8a
vptovf pfur8a.vpl pfur8a.vf pfur8a.tfm
The name of the font files (pfur in this case) should correspond to the naming conventions specified in the Fontname naming scheme. For further details see also the dvips documentation.


Inserting the font into teTeX tree

The particular files are distributed over the teTeX font tree as follows: I stored the above mentioned Futura files in
$TETEXDIR/texmf/fonts/afm/adobe/futura/Futura.afm
$TETEXDIR/texmf/fonts/tfm/adobe/futura/pfur8a.tfm
$TETEXDIR/texmf/fonts/tfm/adobe/futura/rpfur8a.tfm
$TETEXDIR/texmf/fonts/vf/adobe/futura/pfur8a.vf
$TETEXDIR/texmf/fonts/type1/adobe/futura/Futura

Do not forget to run texhash so that teTeX knows about new files.


Registering the font for TeX

Now it was necessary to tell the TeX about the new font. For this I had to alter two files: in $TETEXDIR/texmf/fontname/special.map I added the line

rpfur8a     adobe    pfur8a
and in $TETEXDIR/texmf/dvips/misc/psfonts.map lines
rpfur8a Futura " StandardEncoding ReEncodeFont " <8a.enc <Futura

teTeX 0.34 note: In this version of teTeX the file psfonts.map resides directly in $TETEXDIR/texmf/dvips/. Also, there was no need to alter special.map in this version of teTeX.


Ghostscript

In order to be able to see the font when viewing the document with xdvi it is necessary to register the font with Ghostscript interpreter. Ghostscript is used by gsftopk to render an image of the font.

First I had to alter the Fontmap file which resides in Ghostscript PS files share directory - on our SGIs with Alladin Ghostscript v4.03 it was /usr/local/share/ghostscript/4.02/Fontmap (no, it is not a typo, 4.03 is a bugfix for 4.02 and therefore it uses the same data directory). There was another Fontmap file in .../fonts/Fontmap, but altering this file had no influence on Ghostscript. On my RedHat Linux with package ghostscript-4.03-2 the Fontmap file resides in /usr/share/ghostscript/4.03/Fontmap.

For the above mentioned Futura font I added the line

(Futura)          (Futura.pfa);
into this file. It told Ghostscript that the font metric of Futura font could be found in file .../fonts/Futura.afm and the font data in .../fonts/Futura.pfa.

Then I created appropriate symbolic links from the font directory of Ghostscript into the teTeX font directory:

ln -s $TETEXDIR/texmf/fonts/afm/adobe/futura/Futura.afm Futura.afm
ln -s $TETEXDIR/texmf/fonts/type1/adobe/futura/Futura Futura.pfa


This page is maintained by Jan Prikryl. It was last updated on July 15, 1997.
If you have any comments, please send a message to prikryl@cg.tuwien.ac.at.