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

4.13 The Install PostScript font menu 

This menu appears after choosing InstPsFont in the run Utilities selection menu of the main 4TeX menu. This utility makes its easy to use whatever PostScript font you need in your (La)TeX documents. If you have a complete font family of PostScript fonts you can use the utility InstPsFam to develop your own style file and use this as your default font family (instead of the Computer Modern family).

Before you can use a PostScript font within TeX documents you need several utilities to convert the PostScript font into all kinds of other files (.vf, .tfm and .pk). A PostScript font consists of at least two files: a .afm file and a .pfb or a .pfa file. The .afm (Adobe font metric) can be regarded as the PostScript equivalent of the .tfm file within TeX. I.e. it contains the information about the sizes of the characters. The .pfb or .pfa file can be seen as the PostScript versions of a .mf file Metafont uses. The difference between a .pfb and a .pfa file is that the first one is an 8 bits file and the second one is an ascii file.

If you do not have an .afm but only a .pfm (i.e. this file is used within MS-Windows) you can convert the .pfm to a .afm by running pfm2afm.exe. This utility can be found in the directory ?:\emtex\utils. Note, however that not all the information contained in the .afm is also available in the .pfm, so there may be some loss in quality.

We will not try to explain all the technical details but we will only describe what has to be done to use a PS font within TeX. The first thing that should be done is to convert the .afm file into a .tfm file. This is done by the program afm2tfm. As a result of differences between font encodings3 we also need a virtual font. The virtual font is generated by the programs vptovpl.exe and vptovf.exe. When we want to view or print the font a bitmap needs to be generated (i.e. a .pk file). This .pk can be generated by using the ps2pk.exe program.

If a DVI-driver cannot find a specific font 4TeX will check if PostScript or Metafont sources are available. If it is a PostScript font it will call ps2pk.exe to generate a bitmap. If it is a Metafont font it will call Metafont. The user does not't need to bother, after the detection of a missing font, 4TeX will check a file called c:\texfiles\4system\psfonts.inf4 if it is a PS font. If you want bitmaps of PS fonts the PS fonts must to be listed this file. If you want to use the PostScript font with dvips to print on a PS printer, then you need to add this font to the c:\texfiles\4system\psfonts.map file. If you want to use the PS font with Ghostscript the file c:\texfiles\4system\fontmap must be updated. Of course all these files are updated automatically by the InstPsFont utility.  

Figure 4.22The InstPsFont menu

[F] choose Font to install
You can type the font name or use the wildcard options as anywhere else in the 4TeX workbench. You can select from all the .afm files that are stored in the directory specified by the environment variable MYPSFONTS. This variable is stored in the file c:\texfiles\4system\texuser.<os>.

[I] Install font
After selecting the font, the encoding and the type of transformation you now can convert the PS font for use within TeX, simply by pressing this key. Because not all the PS fonts follow Karl Berry's font naming rules, 4TeX takes the first 5 letters of the PS font and the last character of the font name to make the (La)TeX font. For example the PS font testfont.ps will result in the TeX font testft. After generating the files needed within TeX and updating the font-setting files, 4TeX will tell you how to use the font within your document. Converting the font testfont.afm will result in the following message:

 The PostScript font testft is now available for use
 within TeX. Within LaTeX this is done by
 defining the font, e.g.
     \font\ownfontname=testft at 12pt
     \font\ownfontname=testft scaled \magstep2
 The font is activated e.g. by the command
     {\ownfontname This is a test}.
 When using NFSS v1 just look at the file
 and with NFSS v2 look at the file
 how the new font can be used within NFSS.
After converting the font you can view or print the font on a test page.

[E] change Encoding type
You can select one of the following three font encodings:

The default encoding is the old NFSS v.1 encoding.

[T] choose Transformation
With this key you to select one of the following transformations:

The default transformation is Raw (no transformation). The type of transformations as well as the use of fonts are clearly explained in the "LaTeX companion".

[S] edit font Setting files
You can edit the font-setting files: psfonts.map, psfonts.inf, and fontmap.

[P] Print font table
After installing the font you can print a test page of the newly installed font.

[V] View font table
After installing the font you can view a test page of the newly installed font.

[L] show Log file font table compilation
In case there are some errors during viewing/printing the test page you can edit the Log file to look for errors.

[R] Return to main menu
Returns you to 4TeX's main menu. Equivalent keys are [Q] and [Esc].

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