.TH mtpk 1 "Nov 95" TeXware .SH NAME mtpk \- generate missing PK font .SH SYNOPSIS .B mtpk [-v] [-d] name dpi bdpi [ magnification ] [ mode ] .br .de Ex .sp .RS .nf .ft C .. .de Xe .ft P .RE .sp .fi .. .SH DESCRIPTION \fIMtpk\fP generates a PK font for \fIname\fP if this font in size \fIdpi\fP with a basic resolution \fIbdpi\fP is missing from the PK search path and if a font description for \fIname\fP is available to make it. When the basic resolution does not uniquely define a desired printer the METAFONT mode \fImode\fP can be used as an extra argument. The program can be called by DVI drivers to generate a missing font or by running it on the command line. In order to function properly in combination with a particular DVI driver the configuration file of mtpk (\fImtpk.cfg\fP) needs to define the proper TFM and PK search path for each supported printer (see mtpk(5) for an explanation of the syntax of mtpk's configuration file). With \fB-v\fP (verbose) and \fB-d\fP (debug) mtpk will generate more output so that possible installation problems can be solved. Mtpk will compute the magnification needed for METAFONT and therefore ignores the optional fourth argument if that contains a magnification. Mtpk will make a PK font when a suitable METAFONT or PostScript font description is available. If the mapfiles from dvips(1) do contain information how name can be build from a PostScript font ps2pk(1) or gsftopk(1) will be used to make it. When such mapping information is not available name is build from a METAFONT source with mf(1). To simply the location PostScript resources like type1 fonts, AFM files and encoding vectors, ps2pk(1) does use the \fIresource databases\fP found in the PSRESOURCEPATH. These databases can be created with mkpsres(1). They provide a mechanism for mapping an internal PostScript resource name (ex. Encoding TeXBase1Encoding) to its external file name (ex. 8r.enc). Resources can be kept on a central place where Display PostScript (UNIX) or Adobe Type Manager (MSWindows) expects them. Ps2pk can not render GhostScript fonts (GSF) when these are not fully compatible with the standard described in ``Adobe Type1 Font Format''. Type1 fonts use a restricted set of PostScript commands so that no full PostScript interpretor is needed for the rasterization. If you do not have real type1 fonts you can use GhostScript fonts instead although most of them are of inferior quality due to the fact that they are derived from low resolution fonts. To render GSF fonts mtpk will use gsftopk(1) if it can find the PostScript name needed to build a PK font for name in the \fCFontmap\fP used by your gs(1). To avoid that every TeX user creates private PK fonts most sites allow them to put these fonts in a world writable directory. With mtpk it is possible to make these directories writable only for a pseudo-login account and readable for others. Only during the very short time that the PK font needs to be copied from a temporary area to its final destination mtpk will need execution permission for this account. For extra safety the date, uid and the name of the PK font can be logged. Normally TeX is setup so that the user does not need to set any environment variable. The system defaults will work fine for them. But sometimes users need to install private fonts. With a proper definition of the environments used to select font sources (MFINPUTS and PSRESOURCEPATH), TFM fonts (TEXFONTS) and PK fonts (TEXPKS) mtpk will work for these private fonts too. To avoid that public font areas are spoiled with private fonts only those PK fonts are accepted in a public area when they are checksum compatible with the TFM fonts of that area. For a good cooperation between DVI driver and mtpk an agreement is needed on the following points: .IP "\fBTFM and PK font search path\fP" It is important that the DVI driver uses the same search paths as mtpk otherwise unexpected behavior is the result. These paths can be set up in a generic way for all supported printers or when this is not possible by specifying them for each combination of \fBbdpi\fP and \fBmode\fP separately in the \fImtpk.cfg\fP configuration file. To allow end-users to overrule the TFM and PK search paths the names used by the drivers can be used in the definition of `tfmpath' and `pkpath'. The following definitions can be used to allow users of dvips and mtpk to overrule the PK path: .RS .Ex TEXMF = /usr/local/tex TEXPKS = .:$TEXMF/fonts/pk%b/%f.%dpk pkpath = $TEXPKS .Xe .RE .IP .IP \fBmode\fP When the PK font is derived from a METAFONT source it important to know the exact METAFONT mode for this font. This mode represents some fine tuning parameters important for low resolution devices. Your system's METAFONT should know about this mode otherwise you will get `proofmode' resulting in huge and unexpected font sizes (typically 2602). You can run mtpk by hand with the -d option to see if this is happening. Then the temporary font forge directory will not be cleaned to allow you to check what is wrong. .IP \fBtolerance\fP When the requested font size is within tolerance of an existing whole or half magstep it will generate the approximate font instead of the exact font. Suppose a driver asks for an 11 point version of a 300 dpi font. With tolerance set to zero (0) it will get an exact font of 330 dpi. When tolerance was set to one (1) mtpk would create a 329 dpi font because this size corresponds to the nearest 0.5 magstep of 300. For larger sizes a bigger tolerance is acceptable. To get the behavior of dvips(1) the value of tolerance can be set to 1+%d/500 allowing a tolerance depending on the actual dpi size (represented by `%d' in the expression). .IP \fBmargin\fP To handle situations in which a DVI driver expects a font of size dpi while mtpk delivers dpi+1 or dpi-1 margin can be set to one (1). The default value of margin is zero (0). .IP \fBchecksums\fP The checksums of TFM and PK fonts provide a nice method to guarantee that both fonts match. Only then one is absolutely sure that the TeX output will be perfect. By default mtpk only accepts PK fonts in public and private PK caches when their checksum matches that of the corresponding TFM font. When the checksums differ and the checksums is set to `on' (its default value) the PK font will be installed in a place relative to the current directory if that is available in the PK path. By setting checksums to `warn' or `off' the user can accept PK fonts that have different checksums with or without warning. .SH FILES \fImtpk.cfg\fP: this file defines the interface of the printers and previewers supported by mtpk and other configurable parameters. See mtpk(5) for a description. \fIPSres.upr\fP: This file contains a collection of PostScript resources grouped per category. The resources used by mtpk are FontOutline, FontAFM and Encoding from which ps2pk can generate PK fonts. The following example shows how such a file may look like: .Ex PS-Resources-1.0 Encoding FontAFM FontOutline \&. Encoding TeXBase1Encoding=/usr/local/tex-3.1415/dvips/8r.enc \&. FontAFM Courier=/usr/lib/DPS/fonts/Courier.pfa \&. FontOutline Courier=/usr/lib/DPS/fonts/Courier.afm \&. .Xe \fIconfig.ps\fP: this configuration file from dvips(1) is searched through the TEXCONFIG path. It may contain a redefinition for the psfonts.map file or add additional map files. In both cases these files are defined on a line starting with `p'. Additional map files start with a `+'. \fIpsfonts.map\fP: this file defines the way PostScript fonts are mapped onto TeX fonts. It contains the internal PostScript name, the amount of extension or slant a font may have or the encoding vector. .SH ENVIRONMENTS The following environment variables can be used to overrule the default values used by mtpk. None of them are hardwired into the program but should be connected to the internal names used by mtpk(5) in the way as demonstrated for MFINPUTS. A typical definition for `mfipath' might be: .RS .Ex TEXMF = /usr/local/tex MFINPUTS = .:$TEXMF/fonts/typefaces// mfipath = $MFINPUTS .Xe .RE .IP TEXFONTS The path for looking after TFM fonts. This path may be recursive. .IP TEXPKS The path for finding PK fonts. Must contain a public directory for storing the global user fonts. .IP FLIPATH The path for looking at font library files. Font libraries are the way MSDOS limitations can be avoided for storing lots of PK fonts. The path does contain a number of FLI files separated by a path separator which is semicolon on MSDOS. A typical example is: .Ex FLIPATH = c:\\texfonts\lj_base;lj_more .Xe .IP TEXCONFIG Defines the path for config.ps and the mapfiles included in it or the default psfonts.map. .IP PSRESOURCEPATH Defines the path for searching PostScript resource databases (PSres.upr). .IP PRINTER .fi When defined the config.$PRINTER file is read if available. .IP MFINPUTS Defines the path for searching METAFONT font descriptions. May be recursive. .SH "SEE ALSO" dvips(1), expr(1), gftopk(1), gsftopk(1), mkpsres(1), mf(1), mtpk(5), pkfonts(1), ps2pk(1), xdvi(1) .SH AUTHOR .nf Piet Tutelaers Derived from earlier mtpk perl script.