In order to use PostScript fonts, TeX needs metric (called TFM) files. Several sets of metrics are available from the archives; for mechanisms for generating new ones, see metrics for PostScript fonts. You also need the fonts themselves; PostScript printers come with a set of fonts built in, but to extend your repertoire you almost invariably need to buy from one of the many commercial font vendors (see, for example, choice of fonts).
If you use LaTeX2e, the best way to get PostScript fonts into your
document is to use the PSNFSS package maintained by Sebastian Rahtz
and Alan Jeffrey (available in macros/latex/packages/psnfss); it's supported by
the LaTeX3 project team, so bug reports can and should be submitted.
PSNFSS gives you a set of packages for changing the default
roman, sans-serif and typewriter fonts; e.g., times.sty will set
up Times Roman, Helvetica and Courier in place of Computer Modern,
while avant.sty just changes the sans-serif family to
AvantGarde. To go with these packages, you will need the font metric
files (watch out for encoding problems! see
metrics for PostScript fonts)
and font description (.fd
) files for each font family you
want to use. These can be obtained from fonts/psfonts, arranged by
vendor (e.g., Adobe, Monotype, etc.). For convenience,
metrics for the common `35' PostScript fonts found in most printers
are provided with PSNFSS, packaged as macros/latex/packages/psnfss/lw35nfss.zip
For older versions of LaTeX there are various schemes, of which the simplest to use is probably the PSLaTeX macros distributed with dvips.
For plain
TeX, you load whatever fonts you like; if the encoding of
the fonts is not the same as Computer Modern it will be up to you to
redefine various macros and accents, or you can use the font
re-encoding mechanisms available in many drivers and in
ps2pk and afm2tfm.
Victor Eijkhout's sophisticated Lollipop package (macros/lollipop) supports declaration of font families and styles in a similar way to LaTeX's NFSS, and so is easy to use with PostScript fonts.
Some common problems encountered are discussed elsewhere (see problems with PS fonts).
Most TeX previewers only display bitmap PK fonts. If you want to preview documents using PostScript fonts, you have three choices:
Font vendors such as Adobe supply metric files for each font, in AFM
(Adobe Font Metric) form; these can be converted to TFM
(TeX Font Metric) form. The CTAN archives have prebuilt metrics
which will be more than enough for many people (fonts/psfonts;
beware - this directory is at the root of a huge tree), but you may
need to do the conversion yourself if you have special needs or
acquire a new font. One important question is the encoding of
(Latin character) fonts; while we all more or less agree about the
position of about 96 characters in fonts (the basic ASCII set), the
rest of the (typically) 256 vary. The most obvious problems are with
floating accents and special characters such as the `pounds sterling'
sign. There are three ways of dealing with this: either you change the
TeX macros which reference the characters (not much fun, and
error-prone); or you change the encoding of the font (easier than you
might think); or you use
virtual fonts
to pretend to
TeX that the encoding is the same as it is used to. If you use
LaTeX2e, it allows for changing the encoding in TeX; read the
LaTeX Companion
(see TeX-related books) for more details.
In practice, if you do much non-English (but Latin script)
typesetting, you are strongly recommended to use the fontenc
package with option `T1
' to select T1
(`Cork')
encoding.
Alan Jeffrey's fontinst package (fonts/utilities/fontinst) is an AFM to TFM converter written in TeX; it is used to generate the files used by LaTeX2e's PSNFSS package to support use of PostScript fonts. It is a sophisticated package, not for the faint-hearted, but is powerful enough to cope with most needs. Much of its power relies on the use of virtual fonts.
For slightly simpler problems, Rokicki's afm2tfm, distributed with dvips (dviware/dvips), is fast and efficient; note that the metrics and styles that come with dvips are not currently LaTeX2e compatible, but Karl Berry plans to distribute metrics directly compatible with PSNFSS in his dvipsk package.
For the Macintosh, there is a program called EdMetrics which does the job (and more). It comes with the Textures distribution, but is in fact free software, available as systems/mac/textures/utilities/EdMetrics.sea.hqx
MS-DOS users can buy (see commercial implementations) Y&Y's Font Manipulation Tools package which includes a powerful afmtotfm program among many other goodies.
For the typical LaTeX user trying to use the
PSNFSS
package, three questions often arise.
First, you have to declare to the DVI driver that you are using
PostScript fonts; in the case of dvips, this means adding
lines to the psfonts.map
file. Otherwise, dvips will try
to find PK
files. If the font isn't built into the printer, you have to acquire
it (in many cases this means buying it from a commercial supplier!).
You then have to instruct the driver to download it with each job (the
mechanism depends on your driver). So it's no
good just installing the metrics for Optima and expecting it to
work. You have to pay hard cash for the font itself, which will come
(for Unix and MS-DOS users) in pfb
(Printer Font Binary) form.
Second, you cannot expect your previewer to suddenly start displaying
PostScript fonts; most of them only know about PK bitmap fonts
such as Computer Modern. ps2pk (fonts/utilities/ps2pk) can create
these from the pfb
file you have bought; this would also let you use
the fonts with non-PostScript device drivers such as the emTeX
ones. You are responsible for making sure you are not breaking the
licence restrictions on font you bought.
Third, the stretch and shrink between words is a function of the font metric; it is not specified in AFM files, so different converters choose different values. The PostScript metrics that come with PSNFSS used to produce quite tight setting, but they were revised in mid 1995 to produce a compromise between American and European practice. Really sophisticated users may not find even the new the values to their taste, and want to override them. Even the casual user may find more hyphenation or overfull boxes than CMR produces; but CMR is extremely generous.
If you are interested in text alone, you can use any of over 20,000 fonts(!) in Adobe Type 1 format (called `PostScript fonts' in the TeX world and `ATM fonts' in the DTP world), or any of several hundred fonts in TrueType format. That is, provided of course, that your previewer and printer driver support scalable outline fonts.
TeX itself only cares about metrics, not the actual
character programs. You just need to create a TeX metric file
TFM using some tool such as afm2tfm, afmtotfm
(from Y&Y, see commercial implementations)
or fontinst. For the previewer or printer driver you need the
actual outline font files themselves (pfa
for Display PostScript, pfb
for ATM on IBM PC, Mac outline font files on Macintosh).
If you also need mathematics, then you are severely limited by the demands that TeX makes of maths fonts (for details, see the paper by B.K.P. Horn in TUGboat 14(3)). For maths, then, there are relatively few choices:
msam
and msbm
symbol sets).
The planned `Lucida Bright Expert' (14 fonts)
adds seriffed fixed width, another handwriting font,
smallcaps, bold maths, upright `maths italic', etc., to the set
The distribution includes support for use with plain
TeX and
LaTeX 2.09. Support under LaTeX2e is provided in
PSNFSS
thanks to Sebastian Rahtz.
plain
TeX and LaTeX 2.09 (including code to link in Adobe Math
Pi 2 and Math Pi 6).
Support under LaTeX2e is provided in
PSNFSS
thanks to Sebastian Rahtz.
(A similar development by Thomas Esser, using the Adobe Palatino fonts, is available from systems/unix/teTeX/updates/texmf/mathppl.sh)
All of the first three font sets are available in formats suitable for IBM PC/Windows, Macintosh and Unix/NeXT from Y&Y and from Blue Sky Research (see commercial suppliers for details). The MathTime fonts are also available from:
TeXploratorsThe very limited selection of maths font sets is a direct result of the fact that a maths font has to be explicitly designed for use with TeX and as a result it is likely to lose some of its appeal in other markets. Furthermore, the TeX market for commercial fonts is minute (in comparison, for example, to Microsoft TrueType font pack #1, which sold something like 10 million copies in a few weeks after release of Windows 3.1!).
1572 West Gray #377
Houston TX 77019
USA
Text fonts in Type 1 format are available from many vendors including Adobe, Monotype, Bitstream. Avoid cheap rip-offs: not only are you rewarding unethical behaviour, destroying the cottage industry of innovative type design, but you are also very likely to get junk. The fonts may not render well (or at all under ATM), may not have the `standard' complement of 228 glyphs, or may not include metric files (needed to make TFM files). Also, avoid TrueType fonts from all but the major vendors. TrueType fonts are an order of magnitude harder to `hint' properly than Type 1 fonts and hence TrueType fonts from places other than Microsoft and Apple may be suspect. In any case you may find other problems with TrueType fonts such as service bureaux not accepting jobs calling for them.
LaTeX2e has a standard package for graphics inclusion, rotation, colour, and other driver-related features. The package is documented in the second edition of the Lamport's LaTeX book (see TeX-related books), and is available in macros/latex/packages/graphics
If you don't use LaTeX2e, perhaps the best method is to use
the psfig
macros written by Trevor Darrell, available in
graphics/psfig
You will also need a DVI to PostScript conversion program that
supports the \special
s. The drivers mentioned in
DVI to PostScript programs do, and come
with a version of psfig
ready to use with them. The psfig
macros
work best with Encapsulated PostScript Files (EPS). In particular,
psfig
will need the file to have a BoundingBox (see Appendix H of
the
PostScript Language Reference Manual). If you don't have an EPS
file, life can be difficult.
One point to note about including PostScript figures is that they are not part of the DVI file, but are only included when you use a DVI to PostScript conversion program. As a result, most DVI previewers will simply show the blank space TeX has reserved for your figure, not the figure itself.
There are two rather good documents on CTAN addressing of figure production with rather different emphasis. Anil K. Goel's, info/figsinltx.ps covers the different ways in which you might generate figures, and one the old (LaTeX 2.09) ways of including them into documents. Keith Reckdahl's, info/epslatex.ps, covers the standard LaTeX2e facilities, as well as some of the supporting packages, notably subfigure (macros/latex/contrib/supported/subfigure) and psfrag (macros/latex/contrib/supported/psfrag).