[pdftex] Adding new fonts

G. D. Brettschneider pdftex at GDBrettschneider.de
Sat Apr 20 20:06:47 CEST 2002


Adrian Heathcote wrote:

> I am trying to load Agaramond...  I have loaded the vf files, the type 
> I .pfb files, the .sty files, and the tfm files into the right places, 
> but I need to change the pdf.cfg and add the pad.map file... Can 
> someone tell me...

You didn't mention the encoding file (8r.enc, in teTeX); pdftex wants to 
have it too...

I always had problems with incoherent files when adding my own fonts to 
the pdfTeX system unless I dared to run afm2tfm and vptovf from the 
command line in order to build the required tfm and vf files by myself.

Starting with a somefont.pfb / somefont.afm pair of font files together 
with a strange.enc, you first have to open the afm file with a text 
editor to find out whether or not its PostScript is different from the 
file name (e.g. SomeFont).

Then you say something like

    afm2tfm somefont.afm -v somefont.vpl -T strange.enc _somefont.tfm > 
extra.map
    vptovf  somefont.vpl somefont.vf somefont.tfm > nil
    rm      somefont.vpl

in order to get somefont.tfm, _somefont.tfm, somefont.vf and extra.map, 
which must contain a line like:

   _somefont SomeFont " Strange-Encoding ReEncodeFont " <strange.enc 
<somefont.pfb

Next you add this to pdftex.cfg by saying

    map +extra.map

Now you have access to that font via the TeX primitive

    \font \myfont = somefont at 10pt
    \myfont

(Horever, there's more to do for LaTeX, see fontinst manual.)

This works only if pdfTeX's environment variables are set correctly. You 
can run a shell script like

    #!/bin/sh
    TEXMF=/home/texmf
    export TEXMF
    (...)

if you want to do these experiments independently from teTeX. In the 
same way you have to set

    TEXMFCNF (and TEXINPUTS) for texmf.cnf and pdftex.cfg,
    TEXFORMATS for the fmt files,
    TEXPOOL for pdftex.pool,
    TEXPSHEADERS for strange.enc and map files,
    TEXFONTS for tfm files,
    VFFONTS for vf files,
    AFMFONTS for afm files,
    T1FONTS for pfb files.

That's all described in detail in the pdftex, dvips and fontinst manuals 
(www.pdftex.org, www.ctan.org).

Regards,

Gerolf





   







More information about the pdftex mailing list