PK files

PK (packed pixel) files store the character images needed to print or view a DVI file containing fonts not listed at the end of your configuration file. For each such font there is usually a number of PK files, each one representing the same font but at a different size. This size (which has no relation to the font's design size) is calculated as follows: size = resolution ×magnification where resolution is either the printer resolution or the viewing resolution, and magnification is the overall font magnification (i.e., the DVI magnification times the individual font scaling). The size is then rounded up to the nearest integer and should equal (±1) one of the folder names in PK-files if you decide to keep PK files of the same size in separate folders. Although TEX allows you to request a font at virtually any magnification, it is obviously impossible to provide an infinite number of PK files. The compromise solution is to provide a range of sizes for each font. These sizes are in a geometric ratio based on powers of 1.2 and correspond to TEX's \magstep values. See Chapters 4 and 10 of The TEXbook for more details. For example, assuming a resolution of 300 and no document magnification:

		 TEX input 		 size 		 PK file


\font\ra=cmr10 300×1.20 cmr10.300pk
\font\rb=cmr10 scaled\magstephalf 300×1.20.5 cmr10.329pk
\font\rc=cmr10 scaled\magstep1 300×1.21 cmr10.360pk
\font\rd=cmr10 scaled\magstep2 300×1.22 cmr10.432pk
\font\re=cmr10 scaled\magstep3 300×1.23 cmr10.518pk
\font\rf=cmr10 scaled\magstep4 300×1.24 cmr10.622pk
\font\rg=cmr10 scaled\magstep5 300×1.25 cmr10.746pk
TEX's \magnification command has a cumulative effect on font scaling:
   \magnification=\magstep1            % document magnification = 1.2
   \font\bigrm=cmr10 scaled\magstep2   % font magnification = 1.44
The font size is now 300×1.2×1.44 = 518.4, so will use cmr10.518pk. Note that LATEX has no \magnification command — use the 11pt and 12pt options to increase the size of all fonts in a LATEX document. For compatibility with other TEX systems, uses a fairly complicated search scheme when looking for a font file. If foo is a PostScript font then looks for foo.tfm in the current folder before looking in TeX-fonts. If foo is not a PostScript font then looks for a PK file at the requested size. For example, if the calculated size is 300 then will look for:

		 1. foo.300pk 		 (in the current folder)

2. :PK-files:300:foo (relative to the location of )
3. :PK-files:300:foo.300pk (ditto)
4. :PK-files:foo.300pk (ditto)
In fact, at each step will also add and subtract 1 from 300 because rounding errors can occur in the size calculation. If still not found, gives up and displays a warning. There is still another possibility to consider: a font name can include an explicit location. For example, your TEX input file might contain \font\xxx=:myfonts:foo. In this case TEX will look for :myfonts:foo.tfm in the current folder; that is, it expects to find a file called foo.tfm in a sub-folder called myfonts. If not found then it gives up; it does not look for foo.tfm in TeX-fonts. Similarly, when you print or view the DVI file, will only look for :myfonts:foo.tfm if foo is a PostScript font, or for :myfonts:foo.300pk (or 301pk or 299pk) if foo is a PK font. Note that the use of an explicit font location is not recommended as it decreases the portability of your TEX input file. Most of the PK files supplied with have been specifically generated for a 300 dpi, write-black laser printer (like the Apple LaserWriter). If your printer doesn't have the same characteristics then you might need to get the correct PK files from some other source. Or build them yourself using {\logo METAFONT\null} as described in section [*]. Note that the 300 dpi PK files supplied with can also be used on a 360 dpi printer like the StyleWriter (because 360 = 300×1.2). Two sub-folders, 394 and 896, complete the standard set of magnifications for a 360 dpi printer: 394 is the nearest integer to 360×1.20.5 and 896 is the nearest integer to 360×1.25.