[next] [prev] [prev-tail] [tail] [up]

6.5 Available fonts 

4TeX stores all standard TeX fonts in directories named after the device they were generated for beneath the directory ?:\emtex\texfonts. E.g., fonts generated for the HP LaserJet are stored in ?:\emtex\texfonts\laserjet. The bitmapped fonts are in `pk'-format and stored in subdirectories according to their resolution. E.g., a 10 points Computer Modern Roman font for a HP LaserJet (300 dpi) will be stored as ?:\emtex\texfonts\laserjet\300dpi\cmr10.pk.

However, fonts an also be stored in font libraries. The advantage of font libraries are:

Disadvantages are: Font libraries can be browsed and edited by the fontlib.exe program. Fontlib has many parameters that are all documented in fontlib.doc. The most important fontlib commands are:
list all fonts in a font library: add or replace a font: remove a font: extract a font: test the integrity of a font library: `300' is an example of size relative to the printer's resolution, which is 300 dpi for HP LaserJets and compatibles. This means that would extract the font sized twice as big, e.g., cmr10 at 20 points.

6.5.1 Commercial fonts 

On the commercial market there are many fonts available.

Whatever commercial and/or public domain PostScript font you have, with the help of the program ps2pk you can generate the PK files for every type of printer. The PostScript fonts (.pfb files) should be stored in the directory ?:\emtex\ps\fonts (i.e. the environment variable PSFONTS). See next section for details on PostScript fonts.

TeX is famous for the excellence of its typesetting and especially the high quality or its mathematics. Most fonts families, however, do not have a special mathematical font and therefore mathematics is often set in Computer Modern. Very popular commercial PostScript fonts that have a mathematical font are the MathTimes fonts for Times (from TeXplorators Corporation) and the Lucida Bright fonts (from Bigelow & Holmes Inc.).

6.5.2 Using PostScript fonts 

If you have access to a PostScript printer, you can use the DviPS program to print a dvi-file, and use any internal or external PostScript font. You can still use font libraries for any font you do not have in PostScript outline format, as DviPS can read font libraries. But mostly you will use internal fonts such as Times-Roman or Palatino. External fonts are usually stored as font outlines called `Postscript Font Binary' (PFB), also called PostScript Type1. An alternative is `Postscript Font Ascii' (PFA), also called PostScript Type3. PFBs and PFAs contain identical information in binary (ascii 0-255) or ascii (ascii 32-127) format. PFB can be translated into PFA and vice versa by PostScript utility programs.
DviPS reads the file psfonts.map from c:\texfiles\4system to find out which font file to include when printing a document using external fonts. An important feature of PostScript fonts is scalability. PostScript fonts can be scaled to literally any size. No more than one font needs to be loaded to achieve this, in contrast to bitmapped fonts such as PK files. For every size you need to load another PK file. Besides, PK files are specific for a given printer resolution--PostScript fonts are not.
PostScript fonts can dowloaded partially by using a program called

Choosing different fonts can be done by means of loading packages in LaTeX or `manually' in plain TeX. E.g., to typeset a document in PostScript Times-Roman you specify times as a package to be loaded. Note that the document can be printed on a PostScript printer at any resolution, but it cannot be printed on a LaserJet printer, unless you have bitmapped fonts available. 4TeX supports all 35 standand PostScript fonts, thanks to the URW fonts supplied with Ghostscript.

6.5.3 Automatic font generation 

Metafont is a program for designing fonts for use by TeX. It interprets a drawing language with a syntax that slightly resembles the Pascal programming language. The input needed for Metafont can be interactive, or from a source file. Metafont source files have the extension .mf. The output of Metafont is a GF (`generic font') file, extension .gf, which contains the bitmap. This may be compressed to a PK (`packed' font) file, extension .pk, using the program GFtoPK.

When compiling your document, TeX does not use the bitmap fonts but only the TFM files (`TeX Font Metrics'). The TFM files describe the dimensions, ligatures and kerns of the font. Metafont can make a TFM file as well as a bitmap font file.

A more detailed description of Metafont can be found in the book `The Metafont book' (Knuth (1986)).

When using the previewer or printer drivers, emTeX will look for correct bitmap fonts in the font libraries (specified in the driver response file) or somewhere on a specified path given by the environment variable DVIDRVFONTS. If a font can not be found, a substitution table (e.g., hplj.sub) is used (see Section 6.1.7).

4TeX can generate fonts on demand if you have set up your directories correctly and specified FONTGEN=y in your texuser.<os>. Many DVI-drivers will pause when one or more fonts are missing, asking you if you want to generate these fonts now. You can get a list of missing fonts by entering [?], enter [N] to skip font generation, or enter [Y] to start font generation.

Naturally, font generation is only possible if font rules are available. 4TeX supports two types of font rules: Metafont (.mf) and PostScript (.pfb). Metafont must be installed in the ?:\emtex\metafont directory; PostScript font files must be installed in directory ?:\emtex\ps\fonts, along with the file psfonts.inf that defines which fonts are available and how .pk files are to be generated from them, using the font rasterizer ps2pk. You can also install your own PostScript font in a directory set by the environment variable MYPSFONTS in texuser.<os>. Likewise, you can also install your own Metafont sources in a directory set by the environment variable MYMF in texuser.<os>. Note that ps2pk will only run on computers equipped with a 80386 cpu or higher.

Bitmapped font files (.pk) will be stored on the directory specified by the environment variable MYFONTS in texuser.<os>, e.g., MYFONTS=c:\texfiles\fonts. In order to make sure the DVI-drivers use the correct fonts for any printer selected, 4TeX puts font files in a subdirectory named after the current Metafont printer mode, e.g., c:\texfiles\fonts\laserjet. 4TeX uses the environment variable PRINTER_MODE set in the printer definition file to store fonts in the subdirectory of MYFONTS. (e.g., the printer definitions file ?:\emtex\prndest\hplj.prt will set PRINTER_MODE=LASERJET and the fonts are stored in c:\texfiles\fonts\laserjet) In this directory, font files are stored in subdirectories named after the resolution of the fonts. For instance, if you need the font CMR10 at 20 points for a LaserJet III, 4TeX will generate c:\texfiles\fonts\laserjet\600dpi\cmr10.pk, because the font is twice as big as the standard 300 dpi resolution. Note that this font is not the same as c:\texfiles\fonts\ljiv\600dpi\cmr10.pk. The latter would be a 10 points font for a 600 dpi LaserJet 4.

[next] [prev] [prev-tail] [front] [up]