|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T m
Length: 13035 (0x32eb) Types: TextFile Names: »mf.1~«
└─⟦060c9c824⟧ Bits:30007080 DKUUG TeX 2/12/89 └─⟦this⟧ »./tex82/Man-pages/mf.1~«
.TH MF 1 2/10/89 .SH NAME cmmf, inimf, virmf \- METAFONT, a language for font design .SH SYNOPSIS .B cmmf [ first line ] .PP .B inimf [ first line ] .PP .B virmf [ first line ] .ie t .ds TX \fRT\v'+0.3m'E\v'-0.3m'X\fP \" for troff .el .ds TX TeX \" for nroff .\" to use, type \*(TX .SH DESCRIPTION M\s-2ETAFONT\s0 reads the program in the specified files and outputs font rasters (in gf format) and font metrics (tfm files). M\s-2ETAFONT\s0 capabilities and language are described in .I The M\s-2ETAFONT\s0\^book by Donald E. Knuth, published by Addison-Wesley. There is also an older manual, .I \*(TX and M\s-2ETAFONT\s0, which describes the older version of M\s-2ETAFONT\s0, now called M\s-2ETAFONT\s0 in SAIL, but this description is now obsolete. .PP Like \*(TX, M\s-2ETAFONT\s0 is normally used with a large body of precompiled macros, and font generation in particular requires the support of several macro files. The basic programs as compiled are called .I inimf and .I virmf, and are distinguished by the fact that .I inimf can be used to precompile macros into a ``*.base'' file, which is used by .I virmf. Virmf can read a precompiled ``*.base'' file, but it cannot create one. It is the version of M\s-2ETAFONT\s0 which lies behind most font production systems. .PP By convention, the program used to compile the Computer Modern fonts is called .I cmmf, which is essentially an alias for .I virmf with the Computer Modern support macros loaded in as a ``base'' file. In the following discussion, the name M\s-2ETAFONT\s0 will be used whenever the behavior of all varieties of the program is the same. Otherwise, it should be assumed that the behavior described is unique to the program named. Any arguments given on the command line to one of the M\s-2ETAFONT\s0 programs, such as .I cmmf, are passed to them as the first input line. As described in .I The M\s-2ETAFONT\s0\^book, that line should begin with a file name or a \\\|controlsequence. The normal usage is to say .IP \fBcmmf\ \fR ' \\\|mode=<printengine>\^;\^ [\^\\\|mag=magstep(\fI\^n\fR\^)\^;\^] ' input\ \^\fI font \fR .PP to start processing .I font.mf. The single quotes are the best way of keeping the shell from misinterpreting the semicolons and from removing the \\ characters, which are needed here to keep M\s-2ETAFONT\s0 from thinking that you want to produce a font called ``mode'' or ``mag''. Other \\\|controlsequences, such as \\\|batchmode (for silent operation) can also appear. The name ``font'' will be the ``jobname'', and is used in forming output file names. If M\s-2ETAFONT\s0 doesn't get a file name in the first line, the jobname is ``mfput''. The default `.mf' extension can be overridden by specifying an extension explicitly. There is no way to read a M\s-2ETAFONT\s0 input file with no filename extension. .PP A log of error messages goes into \fI font\fB\^.\^\fIlog\fR where\fI font\fR is the jobname. The output files are \fI font\fB\^.\^\fItfm\fR and \fI font\fB\^.\^\fI<\fR\^number\^\fI>gf\fR where <number> depends on the resolution and magnification of the font. If the ``\\\|mode'' is not specified or is not valid for your site, M\s-2ETAFONT\s0 will default to ``proof'' mode which produces large character images for use in font design and refinement. Proof mode can immediately be recognized by the appearance of the suffix .I .2602gf \^ after the jobname. Examples of proof mode output can be found in .I The Computer Modern Fonts, (Volume E of .I Computers and Typesetting ), by Donald Knuth. The system of .I magsteps is identical to the system used by \*(TX, with values normally in the range 0.5, 1.0, 2.0, 3.0, 4.0 and 5.0. Magnification can also be specified as an arbitrary value, such as 1.315, to create special character sizes. A listing of gf numbers for 118-dpi, 240-dpi and 300 dpi fonts is shown below. .sp.2i 118 dpi 240 dpi 300 dpi .br 1. Mag=0 118 240 300 .br 2. Mag=0.5 129 263 329 .br 3. Mag=1 142 288 360 .br 4. Mag=2 170 346 432 .br 5. Mag=3 204 415 518 .br 6. Mag=4 245 498 622 .br 7. Mag=5 294 597 746 .PP Before font production can begin, it is necessary to set up the appropriate `base' files. The minimum set of components for font production for a given print-engine is the `plain.mf' macro file and the local `mode_def' file. The macros in `plain.mf' can be studied in an appendix to the .I M\s-2ETAFONT\s0\^book; they were developed by Donald Knuth, and this file should never be altered except when it is officially upgraded. Mode_def specifications are tailored to each different print-engine. There is a regular discussion of them in the journal of the \*(TX Users Group, .I TUGboat, and models can be found in the files `waits.mf' and `U_Wash.mf' which come in the standard distribution of \*(TX for Unix systems. A good `mode_def' file (which we will here call `\s-2SITE\s0\^-modes.mf\|'\|) should also supply other features in the `gf' and `tfm' output from .I cmmf. With only `plain.mf' and `\s-2SITE\s0\^-modes.mf' loaded it is possible to create fonts of simple characters, such as those used for the M\s-2ETAFONT\s0 logo, but the production of Computer Modern fonts requires that `cmbase.mf, be loaded as well. The best way to do this is to create a small ``driver'' file with the lines .br .in +15 input plain .br input `\s-2SITE\s0\^-modes' .br input cmbase .in -15 and name this file `cmplain.mf'. Then run .I inimf with the arguments ``cmplain dump'', and you will finish up with a file named cmplain.base. The `base' file is used by .I virmf. It needs to be given a base file name as the first thing it reads. A base file name is preceded by an &, which needs to be quoted or escaped with \\ if given on the command line. One could set up a cshell alias with .br .ti +10 alias cmmf "virmf\0\|\\\|&cmplain" .br to allow regular use of .I cmmf, but a preferable way is to set up an executable script with the name .I cmmf which can ensure that `cmplain.base' is loaded whenever .I cmmf is called. .PP There are some environment variables that can be used to set up directory paths to search when M\s-2ETAFONT\s0 opens a file for input. For example, the .I csh command .br .in +4 setenv \s-2MFINPUTS\s0\ .\^:\^/usr/me/mylib\^:\^/usr/local/lib/mf/inputs .in -4 or the .I sh command sequence .br .in +4 \s-2MFINPUTS\s0\|=\|.\^:\^/usr/me/mylib\^:\^/usr/local/lib/mf/inputs .br export \s-2MFINPUTS\s0 .in -4 .br would cause all invocations of M\s-2ETAFONT\s0 and its derivatives to look for \\\|input files first in the current directory, then in a hypothetical user's ``mylib'', and finally in the system library. Normally, the user will place the command sequence which sets up the \s-2MFINPUTS\s0 environment variable in the .I .\|cshrc or .I .\|profile file. .PP The .I e response to M\s-2ETAFONT\s0\|'s error-recovery mode invokes the .I GNU emacs editor at the erroneous line of the source file. There is an environment variable, \s-2MFEDITOR\s0, that can be used to specify the editor. It should contain a string with "%s" indicating where the filename goes and "%d" indicating where the decimal linenumber (if any) goes. For example, an \s-2MFEDITOR\s0 string for the "vi" editor can be set by: .br .ti +3 setenv \s-2MFEDITOR\s0 "/usr/ucb/vi +%d %s" .br .sp .7 (replacing the path name for the editor as appropriate on your system). The Environment section below lists the relevant environment variables, and their defaults. .PP A convenient file in the library is null.mf, containing nothing. When mf can't find the file it thinks you want to input, it keeps asking you for another file name; responding `null' gets you out of the loop if you don't want to input anything. .PP .SH "EXAMPLES" .PP Most sites need at least two families of font resolution are utilized, one for printing and the other for previewing. If both write-white and write-black printers are used at the same site it may even be necessary to have two sets of fonts at the same resolution. When preloaded with a `mode-def' file such as U_Wash.mf, M\s-2ETAFONT\s0 has several modes, each associated with a given print engine or display device. In regular use the mode `localfont' is made equivalent to the mode for the print-engine most in use. There are also two styles of proof mode for character designers. .TP 2.1i .I proof mode Generates full-page font proofs using gray-pixel fonts .TP .I smoke mode Generates full-page font proofs using black-pixel fonts .TP .I localfont mode Generates font at resolution suitable for printing .PP Once a M\s-2ETAFONT\s0 source is written, the following steps may be used to generate a GF file for proofing, TFM file for the width table, and raster font files for printing and previewing at each desired resolution. .br .TP 2i STEP 1. Compile font .br Input: cmmf myfont .br Output: myfont.2602gf, myfont.log .TP STEP 2. Generate DVI-file .br Input: gftodvi myfont.2602gf .br Output: myfont.dvi, myfont.log .TP STEP 3. Produce printable output (e. g. from a PostScript printer) .br Input: dvi2ps myfont | lpr .br Note: You need special black, gray and slant fonts for this. .TP STEP 4. Generate generic format rastered font: .br Input: cmmf\ ' \\\|mode=localfont\^;\^ \\\|mag=magstep(1.0)\^; ' input myfont .br Output: myfont.360gf, myfont.tfm, myfont.log .br .SH ENVIRONMENT The defaults for all environments are set at the time of compilation, by reference to a file called site.h. The values given below are preset in this file, and may be different at some sites. .PP .IP \s-2MFINPUTS\s0 Search path for \\\|input and \\\|openin files. It should be colon-separated, and start with ``.''. The entire path must be no longer than 700 characters long. Default: .\^:\^/usr/local/lib/mf/inputs .IP \s-2MFBASES\s0 Search path for base files. Default: .\^:\^/usr/local/lib/mf/bases .IP \s-2MFPOOL\s0 Search path for M\s-2ETAFONT\s0 strings. Default: .\^:\^/usr/local/lib/mf .IP \s-2MFEDITOR\s0 Command template for switching to editor. Default: /usr/local/bin/emacs +%d %s .br .SH "FONT UTILITIES" .PP A number of utility programs are available (see section See Also). The following is a partial list of available utilities and their purpose. Consult your local M\s-2ETAFONT\s0 guru for details. .br .TP 1.5i .B gftopk Takes a GF file and produces a more tightly packed PK font file .TP .B pktogf Unpacks a PK file into GF format .TP .B gftodvi Produces proof sheets for fonts .TP .B gftype Displays the contents of a GF file in mnemonics and images .br .TP .B pktype Mnemonically displays the contents of a PK file .br .TP .B mft Formats a source file (font.mf) as shown in .I Computer Modern Typefaces .PP .SH "FILES" .TP 1.3i /usr/local/lib/mf M\s-2ETAFONT\s0's library area .TP /usr/local/lib/mf/mf.pool Encoded text of M\s-2ETAFONT\s0's messages .TP /usr/local/lib/mf/bases M\s-2ETAFONT\s0 *.base files and short driver files for inimf .TP /usr/local/lib/mf/inputs/plain.mf The ``standard'' macro package .TP /usr/local/lib/mf/inputs/`\s-2SITE\s0\^-modes'.mf The file of ``mode_def''s for your site's various printers .TP /usr/local/lib/mf/inputs/cmbase.mf M\s-2ETAFONT\s0 macros for Computer Modern .br .SH "SUGGESTED READING" Donald E. Knuth, .I The M\s-2ETAFONT\s0\^book (Volume C of \fI Computers and Typesetting\fR\|) .br Donald E. Knuth, .I M\s-2ETAFONT\s0\^ the Program (Volume D of \fI Computers and Typesetting\fR\|) .br Donald E. Knuth, .I Computer Modern Typefaces (Volume E of \fI Computers and Typesetting\fR\|) .br .I TUGboat (the publication of the \*(TX Users Group) .br .SH "COMMENTS" Warning: ``Type design can be hazardous to your other interests. Once you get hooked, you will develop intense feelings about letterforms; the medium will intrude on the messages that you read. And you will perpetually be thinking of improvements to the fonts that you see everywhere, especially those of your own design.'' .br .SH "BUGS" On January 4, 1986 the ``final'' bug in M\s-2ETAFONT\s0 was discovered and removed. If an error still lurks in the code, D. E. Knuth promises to pay a finders fee which doubles every year to the first person who finds it. Happy hunting. .br .SH "AUTHORS" M\s-2ETAFONT\s0 was designed by Donald E. Knuth, who implemented it using his W\s-2EB\s0 system for Pascal programs. It was ported to Unix by Paul Richards at the University of Illinois at Urbana-Champlain. The version now offered with the Unix \*(TX distribution is that generated by the W\s-2EB\s0 to C system, written by Tomas Rokicki and Tim Morgan. This page written by Pierre MacKay, with help from the anonymous author of the page in the jTeX software distribution. .br .SH "SEE ALSO" dvitype(1), gftopk(1), gftodvi(1), gftype(1), pktogf(1), mft(1), pktype(1), pltotf(1), tftopl(1)