DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦9a55613f7⟧ TextFile

    Length: 9593 (0x2579)
    Types: TextFile
    Names: »afm2tfm.1«

Derivation

└─⟦52210d11f⟧ Bits:30007239 EUUGD2: TeX 3 1992-12
    └─⟦8d3183c2b⟧ »utils/dvips541.tar.Z« 
        └─⟦008d6ff64⟧ 
            └─⟦this⟧ »./dvips/afm2tfm.1« 

TextFile

.\" man page for afm2tfm
.TH AFM2TFM 1 "9 August 1990"
.SH NAME
afm2tfm \- convert Adobe font metrics to TeX font metrics
.SH SYNOPSIS
.B afm2tfm
.IR foo1[.afm]
[
.B -e
.I ratio
]
[
.B -s
.I slant
]
[
.B -t
.I foo2[.tfm]
]
[
.B -v
.IR bar[.vpl]
|
.B -V
.IR bar[.vpl]
]
[
.IR foo3[.tfm]
]
.br
.SH DESCRIPTION
PostScript fonts are (or should be) accompanied by font metric files
such as
.B Times-Roman.afm,
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
.sp
.ce
afm2tfm Times-Roman.afm Times-Roman.tfm
.sp
(which can be reduced to simply
.sp
.ce
afm2tfm Times-Roman
.sp
by taking default shortcuts) will create the necessary file
.B Times-Roman.tfm,
which can then be moved to the directory where TeX normally looks for
font metric information. The PostScript conversion program
.B dvips
will also treat Times-Roman as a resident PostScript font if you
include the line
.sp
.ce
Times-Roman
.sp
in the file
.I psfonts.map.
.sp
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
.B dvips.tex
documentation for the correct names to use.
.sp
PostScript fonts have a different encoding scheme from that of plain
TeX. Although both schemes are based on ASCII, special 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
.sp
.ce
afm2tfm Times-Roman -v times
.sp
or, more fully, by:
.sp
.ce
afm2tfm Times-Roman.afm -v times.vpl Times-Roman.tfm
.sp
This produces two outputs, namely the "virtual property list" file
.B times.vpl
and the TeX font metric file
.B Times-Roman.tfm.
The latter file describes an "actual font" on which the virtual font is based.
.sp
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.
.sp
To use the font in TeX, you should first run
.sp
.ce
vptovf times.vpl times.vf times.tfm
.sp
then install the file
.B times.vf
in the directory for virtual fonts and install
.B times.tfm
in the directory for TeX font metrics. (You can also make more complex
virtual fonts by editing
.B times.vpl
first.) Once this has been done, you're all set. You can use
code like this in TeX henceforth:
.sp
.nf
.na
        \efont\emyfont=times at 10pt
        \emyfont
        Hello, I am being typeset in Times-Roman.
.fi
.ad
.sp

Note that there are two fonts, one actual (`Times-Roman',
which is analogous to a raw piece of hardware) and
one virtual (`times', which
has typesetting knowhow added). You could also say
`\efont\eTR=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 \eae. The virtual font
called
.B
times
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 example, it includes all
the Adobe characters (such as the Polish 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'
(\echar 19) by defining a suitable control sequence. (The 58
constructed characters are found in the AFM file, and constructed
as specified by Adobe; you may wish to adjust the spacing and/or
add additional 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 buy
them separately).
.sp
These fonts can be scaled to any size.
Go wild!
Note, however, that using PostScript fonts does
use up the printer's virtual memory and it does take time.
You may find
downloading the Computer Modern fonts to be faster than using
the built-in PostScript fonts!
.sp     
.SH OPTIONS
Special effects are also obtainable, with commands such as
.sp
.ce
afm2tfm Times-Roman -s .167 -v timessl Times-Slanted
.sp
which create
.B timessl.vpl
and
.B Times-Slanted.tfm.
To use this, proceed as above but put the line
.sp
Times-Slanted "/Times-Roman .167 SlantFont"
.sp
into
.I psfonts.map.
Then
.B Times-Slanted
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
.sp
.ce
afm2tfm Times-Extended -e 1.2 -v timesx Times-Extended
.sp
and by recording the pseudo-resident font
.sp
Times-Extended "/Times-Roman 1.2 ExtendFont"
.sp
The command line switches are:
.IP "\fB-e\fP \fIratio\fP"
All characters are stretched horizontally by the stated
.I ratio;
if it is less than 1.0, you get a condensed font.
.IP "\fB-s\fP \fIslant\fP"
All characters are slanted to the right by the stated
.I slant;
if it is negative, the letters slope to the left (or they might be
upright if you start with an italic font).
.IP "\fB-v\fP \fIfile\fP[.\fIvpl\fP]"
Generate a virtual property list (VPL) file as well as a TFM file.
.IP "\fB-V\fP \fIfile\fP[.\fIvpl\fP]"
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.
.sp
.SH NON-RESIDENT POSTSCRIPT FONTS
If you want to use a non-printer-resident PostScript font for which you have
a .pfb file (an Adobe Type 1 font program), 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
.I psfonts.map
file entry. For example,
.sp
.ce
StoneInformal <StoneInformal.pfb
.sp
will cause
.B dvips
to include StoneInformal.pfb in your document as if it were a header file,
whenever the pseudo-resident font StoneInformal is used in a document. 
Similarly, you can generate transformed fonts and include lines like
.sp
.ce
StoneInformal-Condensed <StoneInformal.pfb "/StoneInformal .8 ExtendFont"
.sp
in
.I psfonts.map,
in which case StoneInformal.pfb will be loaded whenever StoneInformal-Condensed
is used. (Each header file is loaded at most once per document.
The .pfb files should be installed in the config directory with
the other header files.)
.sp
.SH FONT ALIASES
Some systems don't handle files with long names well---MSDOS and TWENEX are
two notable examples.  For this reason,
.B dvips 
will accept an alias for such fonts.  Such an alias should be the first word
on the
.I psfonts.map
line.  For instance, if we wanted the name
.I ptmr
to be used for
.I Times-Roman
since our computer can't handle long names, we would use the following line
in our
.I psfonts.map
file:
.sp
.ce
ptmr Times-Roman
.sp
The TFM file must have the name
.I ptmr.tfm.
.sp
The parsing of the
.I psfonts.map
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 file (or downloaded PostScript font).  If a word starts with
a double quote, it is special instructions on how to generate 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.
.sp
Note that the aliases also register the full PostScript name, so the single line
.sp
.ce
ptmr Times-Roman
.sp
would allow
.B dvips
to `find' the
.I ptmr
font as well as the
.I Times-Roman
font.
.sp
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 characters 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 corresponding 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).
.SH FILES
.I psfonts.map
in the config directory used by dvips (update this).
.br
.I ../afm/Makefile
in the dvips sources (look at this for examples).
.SH "SEE ALSO"
dvips(1), tex(1), vptovf(1)
.SH BUGS
An option to add letterspacing to the virtual font was rejected by Knuth
because it would make the fi and fl ligatures break the normal rhythmic pattern.
.SH AUTHORS
Tomas Rokicki <rokicki@neon.stanford.edu> and Don Knuth