AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

NNAAMMEE
afm2tfm - convert Adobe font metrics to TeX font metrics

SSYYNNOOPPSSIISS
afm2tfm _f_o_o_1[._a_f_m] [ --ee _r_a_t_i_o ] [ --ss _s_l_a_n_t ] [ --tt _f_o_o_2[._t_f_m]
] [ --vv _b_a_r[._v_p_l] | --VV _b_a_r[._v_p_l] ] [ _f_o_o_3[._t_f_m] ]

DDEESSCCRRIIPPTTIIOONN
PostScript fonts are (or should be) accompanied by font
metric files such as TTiimmeess--RRoommaann..aaffmm,, which describes the
characteristics of the font called Times-Roman. To use such
fonts with TeX, we need TFM files that contain similar
information. The command

afm2tfm Times-Roman.afm Times-Roman.tfm

(which can be reduced to simply

afm2tfm Times-Roman

by taking default shortcuts) will create the necessary file
TTiimmeess--RRoommaann..ttffmm,, which can then be moved to the directory
where TeX normally looks for font metric information. The
PostScript conversion program ddvviippss will also treat Times-
Roman as a resident PostScript font if you include the line

Times-Roman

in the file _p_s_f_o_n_t_s._m_a_p.

The file names used in this manual page are not consistent
with the new font naming scheme implemented by Karl Berry;
please refer to the main ddvviippss..tteexx documentation for the
correct names to use.

PostScript fonts have a different encoding scheme from that
of plain TeX. Although both schemes are based on ASCII, spe-
cial characters such as ligatures and accents are handled
quite differently. Therefore we obtain best results by using
a "virtual font" interface, which makes TeX act as if the
PostScript font had a standard TeX encoding. Such a virtual
font can be obtained, for example, by the command

afm2tfm Times-Roman -v times

or, more fully, by:

afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm

This produces two outputs, namely the "virtual property
list" file ttiimmeess..vvppll and the TeX font metric file TTiimmeess--
Roman.tfm. The latter file describes an "actual font" on

Printed 11/25/90 9 August 1990 1

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

which the virtual font is based.

If you wish to specify a different TFM file name than the
default, you can use the -t option; this will override any
default TFM file name that would be calculated from the
input file name.

To use the font in TeX, you should first run

vptovf times.vpl times.vf times.tfm

then install the file ttiimmeess..vvff in the directory for virtual
fonts and install ttiimmeess..ttffmm in the directory for TeX font
metrics. (You can also make more complex virtual fonts by
editing ttiimmeess..vvppll first.) Once this has been done, you're
all set. You can use code like this in TeX henceforth:

\font\myfont=times at 10pt
\myfont
Hello, I am being typeset in Times-Roman.

Note that there are two fonts, one actual (`Times-Roman',
which is analogous to a raw piece of hardware) and one vir-
tual (`times', which has typesetting knowhow added). You
could also say `\font\TR=Times-Roman at 10pt' and typeset
directly with that, but then you would have no ligatures or
kerning, and you would have to use Adobe character positions
for special letters like \ae. The virtual font called ttiimmeess
not only has ligatures and kerning, and most of the standard
accent conventions of TeX, it also has a few additional
features not present in the Computer Modern fonts. For exam-
ple, it includes all the Adobe characters (such as the Pol-
ish ogonek and the French guillemots). It also allows you to
type 58 accented letters from `Aacute' to `zcaron' as if
they were ligatures --- namely as `acute' followed by `A',
etc., where you can get `acute' (\char 19) by defining a
suitable control sequence. (The 58 constructed characters
are found in the AFM file, and constructed as specified by
tional accent combinations by editing the VPL file.) The
only things you lose from ordinary TeX text fonts are the
dotless j (which can be hacked into the VPL file with
literal PostScript specials if you have the patience) and
uppercase Greek letters (which just don't exist unless you

These fonts can be scaled to any size. Go wild! Note, how-
ever, that using PostScript fonts does use up the printer's
virtual memory and it does take time. You may find down-
the built-in PostScript fonts!

Printed 11/25/90 9 August 1990 2

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

OOPPTTIIOONNSS
Special effects are also obtainable, with commands such as

afm2tfm Times-Roman -s .167 -v timessl Times-Slanted

which create ttiimmeessssll..vvppll and TTiimmeess--SSllaanntteedd..ttffmm.. To use this,
proceed as above but put the line

Times-Slanted "/Times-Roman .167 SlantFont"

into _p_s_f_o_n_t_s._m_a_p. Then TTiimmeess--SSllaanntteedd will act as if it were
a resident font, although it is actually constructed from
Times-Roman by PostScript hackery. (It's an oblique version
of Times-Roman, obtained by slanting everything 1/6 to the
right.) Similarly, you can get an extended font by

afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended

and by recording the pseudo-resident font

Times-Extended "/Times-Roman 1.2 ExtendFont"

The command line switches are:

--ee _r_a_t_i_o
All characters are stretched horizontally by the stated
_r_a_t_i_o; if it is less than 1.0, you get a condensed
font.

--ss _s_l_a_n_t
All characters are slanted to the right by the stated
_s_l_a_n_t; if it is negative, the letters slope to the left
font).

--vv _f_i_l_e[._v_p_l]
Generate a virtual property list (VPL) file as well as
a TFM file.

--VV _f_i_l_e[._v_p_l]
Same as -v, but the virtual font generated is a caps-
and-small-caps font obtained by scaling uppercase
letters by .8 to typeset lowercase. This font handles
accented letters and retains proper kerning.

NNOONN--RREESSIIDDEENNTT PPOOSSTTSSCCRRIIPPTT FFOONNTTSS
If you want to use a non-printer-resident PostScript font
for which you have a .pfb file (an Adobe Type 1 font pro-
gram), you can make it act like a resident font by putting a
`<' sign and the name of the .pfb file just after the font
name in the _p_s_f_o_n_t_s._m_a_p file entry. For example,

Printed 11/25/90 9 August 1990 3

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

StoneInformal
will cause ddvviippss to include StoneInformal.pfb in your docu-
ment as if it were a header file, whenever the pseudo-
resident font StoneInformal is used in a document. Simi-
larly, you can generate transformed fonts and include lines
like

StoneInformal-Condensed
in _p_s_f_o_n_t_s._m_a_p, in which case StoneInformal.pfb will be
loaded whenever StoneInformal-Condensed is used. (Each
files should be installed in the config directory with the

FFOONNTT AALLIIAASSEESS
Some systems don't handle files with long names well---MSDOS
and TWENEX are two notable examples. For this reason, ddvviippss
will accept an alias for such fonts. Such an alias should
be the first word on the _p_s_f_o_n_t_s._m_a_p line. For instance, if
we wanted the name _p_t_m_r to be used for _T_i_m_e_s-_R_o_m_a_n since our
computer can't handle long names, we would use the following
line in our _p_s_f_o_n_t_s._m_a_p file:

ptmr Times-Roman

The TFM file must have the name _p_t_m_r._t_f_m.

The parsing of the _p_s_f_o_n_t_s._m_a_p file should be explained to
eliminate all confusion. Each line is separated into words,
where words are separated by spaces or tabs. If a word
begins with a double quote, however, it extends until the
next double quote or the end of the line. If a word starts
with a less than character, it is treated as a font header
a double quote, it is special instructions on how to gen-
erate that font. Otherwise it is a name. The first such
name is always the name TeX uses for the font and is also
the name of the TFM file. If there is another name word,
that name is used as the PostScript name; if there is only
one name word, it is used for both the TeX name and the
PostScript name.

Note that the aliases also register the full PostScript
name, so the single line

ptmr Times-Roman

would allow ddvviippss to `find' the _p_t_m_r font as well as the
_T_i_m_e_s-_R_o_m_a_n font.

Printed 11/25/90 9 August 1990 4

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

Incidentally, many font files (e.g., in the Adobe Type
Library) include more characters internally than you can
access directly without making a few changes. These charac-
ters typically have code -1 in the afm file and no
corresponding "constructed character" (CC) specification.
For example, in Adobe Garamond there are Eth and eth, Thorn
and thorn, plus things like copyright and onehalf, plus 58
accented letters Aacute thru zcaron (with accents over caps
much better looking than you can get from constructed
accents). To use these characters, give them character codes
between 0 and 255 in the afm file, and build the correspond-
ing EncodingVector (instead of StandardEncoding) in the pfb
file. Then afm2tfm will generate a vpl file that includes
accented characters as ligatures, as explained above; for
example, `Aacute' will be accessible as `acute' followed by
`A' (as well as by its character code in the virtual font).

FFIILLEESS
_p_s_f_o_n_t_s._m_a_p in the config directory used by dvips (update
this).
../_a_f_m/_M_a_k_e_f_i_l_e in the dvips sources (look at this for exam-
ples).

SSEEEE AALLSSOO
dvips(1), tex(1), vptovf(1)

BBUUGGSS
An option to add letterspacing to the virtual font was
rejected by Knuth because it would make the fi and fl liga-
tures break the normal rhythmic pattern.

AAUUTTHHOORRSS
Tomas Rokicki and Don Knuth

Printed 11/25/90 9 August 1990 5

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

NNAAMMEE
afm2tfm - convert Adobe font metrics to TeX font metrics

SSYYNNOOPPSSIISS
afm2tfm _f_o_o_1[._a_f_m] [ --ee _r_a_t_i_o ] [ --ss _s_l_a_n_t ] [ --tt _f_o_o_2[._t_f_m]
] [ --vv _b_a_r[._v_p_l] | --VV _b_a_r[._v_p_l] ] [ _f_o_o_3[._t_f_m] ]

DDEESSCCRRIIPPTTIIOONN
PostScript fonts are (or should be) accompanied by font
metric files such as TTiimmeess--RRoommaann..aaffmm,, which describes the
characteristics of the font called Times-Roman. To use such
fonts with TeX, we need TFM files that contain similar
information. The command

afm2tfm Times-Roman.afm Times-Roman.tfm

(which can be reduced to simply

afm2tfm Times-Roman

by taking default shortcuts) will create the necessary file
TTiimmeess--RRoommaann..ttffmm,, which can then be moved to the directory
where TeX normally looks for font metric information. The
PostScript conversion program ddvviippss will also treat Times-
Roman as a resident PostScript font if you include the line

Times-Roman

in the file _p_s_f_o_n_t_s._m_a_p.

The file names used in this manual page are not consistent
with the new font naming scheme implemented by Karl Berry;
please refer to the main ddvviippss..tteexx documentation for the
correct names to use.

PostScript fonts have a different encoding scheme from that
of plain TeX. Although both schemes are based on ASCII, spe-
cial characters such as ligatures and accents are handled
quite differently. Therefore we obtain best results by using
a "virtual font" interface, which makes TeX act as if the
PostScript font had a standard TeX encoding. Such a virtual
font can be obtained, for example, by the command

afm2tfm Times-Roman -v times

or, more fully, by:

afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm

This produces two outputs, namely the "virtual property
list" file ttiimmeess..vvppll and the TeX font metric file TTiimmeess--
Roman.tfm. The latter file describes an "actual font" on

Printed 11/25/90 9 August 1990 1

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

which the virtual font is based.

If you wish to specify a different TFM file name than the
default, you can use the -t option; this will override any
default TFM file name that would be calculated from the
input file name.

To use the font in TeX, you should first run

vptovf times.vpl times.vf times.tfm

then install the file ttiimmeess..vvff in the directory for virtual
fonts and install ttiimmeess..ttffmm in the directory for TeX font
metrics. (You can also make more complex virtual fonts by
editing ttiimmeess..vvppll first.) Once this has been done, you're
all set. You can use code like this in TeX henceforth:

\font\myfont=times at 10pt
\myfont
Hello, I am being typeset in Times-Roman.

Note that there are two fonts, one actual (`Times-Roman',
which is analogous to a raw piece of hardware) and one vir-
tual (`times', which has typesetting knowhow added). You
could also say `\font\TR=Times-Roman at 10pt' and typeset
directly with that, but then you would have no ligatures or
kerning, and you would have to use Adobe character positions
for special letters like \ae. The virtual font called ttiimmeess
not only has ligatures and kerning, and most of the standard
accent conventions of TeX, it also has a few additional
features not present in the Computer Modern fonts. For exam-
ple, it includes all the Adobe characters (such as the Pol-
ish ogonek and the French guillemots). It also allows you to
type 58 accented letters from `Aacute' to `zcaron' as if
they were ligatures --- namely as `acute' followed by `A',
etc., where you can get `acute' (\char 19) by defining a
suitable control sequence. (The 58 constructed characters
are found in the AFM file, and constructed as specified by
tional accent combinations by editing the VPL file.) The
only things you lose from ordinary TeX text fonts are the
dotless j (which can be hacked into the VPL file with
literal PostScript specials if you have the patience) and
uppercase Greek letters (which just don't exist unless you

These fonts can be scaled to any size. Go wild! Note, how-
ever, that using PostScript fonts does use up the printer's
virtual memory and it does take time. You may find down-
the built-in PostScript fonts!

Printed 11/25/90 9 August 1990 2

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

OOPPTTIIOONNSS
Special effects are also obtainable, with commands such as

afm2tfm Times-Roman -s .167 -v timessl Times-Slanted

which create ttiimmeessssll..vvppll and TTiimmeess--SSllaanntteedd..ttffmm.. To use this,
proceed as above but put the line

Times-Slanted "/Times-Roman .167 SlantFont"

into _p_s_f_o_n_t_s._m_a_p. Then TTiimmeess--SSllaanntteedd will act as if it were
a resident font, although it is actually constructed from
Times-Roman by PostScript hackery. (It's an oblique version
of Times-Roman, obtained by slanting everything 1/6 to the
right.) Similarly, you can get an extended font by

afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended

and by recording the pseudo-resident font

Times-Extended "/Times-Roman 1.2 ExtendFont"

The command line switches are:

--ee _r_a_t_i_o
All characters are stretched horizontally by the stated
_r_a_t_i_o; if it is less than 1.0, you get a condensed
font.

--ss _s_l_a_n_t
All characters are slanted to the right by the stated
_s_l_a_n_t; if it is negative, the letters slope to the left
font).

--vv _f_i_l_e[._v_p_l]
Generate a virtual property list (VPL) file as well as
a TFM file.

--VV _f_i_l_e[._v_p_l]
Same as -v, but the virtual font generated is a caps-
and-small-caps font obtained by scaling uppercase
letters by .8 to typeset lowercase. This font handles
accented letters and retains proper kerning.

NNOONN--RREESSIIDDEENNTT PPOOSSTTSSCCRRIIPPTT FFOONNTTSS
If you want to use a non-printer-resident PostScript font
for which you have a .pfb file (an Adobe Type 1 font pro-
gram), you can make it act like a resident font by putting a
`<' sign and the name of the .pfb file just after the font
name in the _p_s_f_o_n_t_s._m_a_p file entry. For example,

Printed 11/25/90 9 August 1990 3

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

StoneInformal
will cause ddvviippss to include StoneInformal.pfb in your docu-
ment as if it were a header file, whenever the pseudo-
resident font StoneInformal is used in a document. Simi-
larly, you can generate transformed fonts and include lines
like

StoneInformal-Condensed
in _p_s_f_o_n_t_s._m_a_p, in which case StoneInformal.pfb will be
loaded whenever StoneInformal-Condensed is used. (Each
files should be installed in the config directory with the

FFOONNTT AALLIIAASSEESS
Some systems don't handle files with long names well---MSDOS
and TWENEX are two notable examples. For this reason, ddvviippss
will accept an alias for such fonts. Such an alias should
be the first word on the _p_s_f_o_n_t_s._m_a_p line. For instance, if
we wanted the name _p_t_m_r to be used for _T_i_m_e_s-_R_o_m_a_n since our
computer can't handle long names, we would use the following
line in our _p_s_f_o_n_t_s._m_a_p file:

ptmr Times-Roman

The TFM file must have the name _p_t_m_r._t_f_m.

The parsing of the _p_s_f_o_n_t_s._m_a_p file should be explained to
eliminate all confusion. Each line is separated into words,
where words are separated by spaces or tabs. If a word
begins with a double quote, however, it extends until the
next double quote or the end of the line. If a word starts
with a less than character, it is treated as a font header
a double quote, it is special instructions on how to gen-
erate that font. Otherwise it is a name. The first such
name is always the name TeX uses for the font and is also
the name of the TFM file. If there is another name word,
that name is used as the PostScript name; if there is only
one name word, it is used for both the TeX name and the
PostScript name.

Note that the aliases also register the full PostScript
name, so the single line

ptmr Times-Roman

would allow ddvviippss to `find' the _p_t_m_r font as well as the
_T_i_m_e_s-_R_o_m_a_n font.

Printed 11/25/90 9 August 1990 4

AFM2TFM(1) Pyramid OSx Operating System AFM2TFM(1)

Incidentally, many font files (e.g., in the Adobe Type
Library) include more characters internally than you can
access directly without making a few changes. These charac-
ters typically have code -1 in the afm file and no
corresponding "constructed character" (CC) specification.
For example, in Adobe Garamond there are Eth and eth, Thorn
and thorn, plus things like copyright and onehalf, plus 58
accented letters Aacute thru zcaron (with accents over caps
much better looking than you can get from constructed
accents). To use these characters, give them character codes
between 0 and 255 in the afm file, and build the correspond-
ing EncodingVector (instead of StandardEncoding) in the pfb
file. Then afm2tfm will generate a vpl file that includes
accented characters as ligatures, as explained above; for
example, `Aacute' will be accessible as `acute' followed by
`A' (as well as by its character code in the virtual font).

FFIILLEESS
_p_s_f_o_n_t_s._m_a_p in the config directory used by dvips (update
this).
../_a_f_m/_M_a_k_e_f_i_l_e in the dvips sources (look at this for exam-
ples).

SSEEEE AALLSSOO
dvips(1), tex(1), vptovf(1)

BBUUGGSS
An option to add letterspacing to the virtual font was
rejected by Knuth because it would make the fi and fl liga-
tures break the normal rhythmic pattern.

AAUUTTHHOORRSS
Tomas Rokicki and Don Knuth

Printed 11/25/90 9 August 1990 5