version 2, including all changes.
.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
MF |
|
|
2 |
!!!MF |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
ONLINE GRAPHICS OUTPUT |
|
|
7 |
OPTIONS |
|
|
8 |
ENVIRONMENT |
|
|
9 |
FONT UTILITIES |
|
|
10 |
FILES |
|
|
11 |
SUGGESTED READING |
|
|
12 |
COMMENTS |
|
|
13 |
SEE ALSO |
|
|
14 |
BUGS |
|
|
15 |
AUTHORS |
|
|
16 |
---- |
|
|
17 |
!!NAME |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
mf, mfw, inimf, virmf - Metafont, a language for font and logo design |
|
|
21 |
!!SYNOPSIS |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
__mf__ [[''options''] [[''commands''] |
|
|
25 |
!!DESCRIPTION |
|
|
26 |
|
|
|
27 |
|
|
|
28 |
This manual page is not meant to be exhaustive. The complete |
|
|
29 |
documentation for this version of TEX can be found in the |
|
|
30 |
info file or manual ''Web2C: A TeX |
|
|
31 |
implementation''. |
|
|
32 |
|
|
|
33 |
|
|
|
34 |
M ETAFONT reads the program in the specified |
|
|
35 |
files and outputs font rasters (in ''gf'' format) and |
|
|
36 |
font metrics (in ''tfm'' format). The M |
|
|
37 |
ETAFONT language is described in ''The M |
|
|
38 |
ETAFONT book''. |
|
|
39 |
|
|
|
40 |
|
|
|
41 |
Like TEX, M ETAFONT is normally used with a |
|
|
42 |
large body of precompiled macros, and font generation in |
|
|
43 |
particular requires the support of several macro files. This |
|
|
44 |
version of M ETAFONT looks at its command |
|
|
45 |
line to see what name it was called under. Both __inimf__ |
|
|
46 |
and __virmf__ are symlinks to the __mf__ executable. |
|
|
47 |
When called as __inimf__ (or when the __--ini__ option |
|
|
48 |
is given) it can be used to precompile macros into a |
|
|
49 |
''.base'' file. When called as __virmf__ it will use |
|
|
50 |
the ''plain'' base. When called under any other name, M |
|
|
51 |
ETAFONT will use that name as the name of the |
|
|
52 |
base to use. For example, when called as __mf__ the |
|
|
53 |
''mf'' base is used, which is identical to the |
|
|
54 |
''plain'' base. Other bases than ''plain'' are rarely |
|
|
55 |
used. |
|
|
56 |
|
|
|
57 |
|
|
|
58 |
The ''commands'' given on the command line to the M |
|
|
59 |
ETAFONT program are passed to it as the first |
|
|
60 |
input line. (But it is often easier to type extended |
|
|
61 |
arguments as the first input line, since UNIX shells tend to |
|
|
62 |
gobble up or misinterpret M ETAFONT 's |
|
|
63 |
favorite symbols, like semicolons, unless you quote them.) |
|
|
64 |
As described in ''The M ETAFONT book'', |
|
|
65 |
that first line should begin with a filename, a |
|
|
66 |
\''controlsequence'', or a |
|
|
67 |
''''. |
|
|
68 |
|
|
|
69 |
|
|
|
70 |
The normal usage is to say |
|
|
71 |
|
|
|
72 |
|
|
|
73 |
__mf__ 'mode= |
|
|
74 |
__n'');]' input ''font'' |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
to start processing ''font.mf''. The single quotes are |
|
|
78 |
the best way of keeping the Unix shell from misinterpreting |
|
|
79 |
the semicolons and from removing the \ character, which is |
|
|
80 |
needed here to keep M ETAFONT from thinking |
|
|
81 |
that you want to produce a font called ''mode''. (Or you |
|
|
82 |
can just say ''mf'' and give the other stuff on the next |
|
|
83 |
line, without quotes.) Other control sequences, such as |
|
|
84 |
''batchmode'' (for silent operation) can also appear. The |
|
|
85 |
name ''font'' will be the ``jobname'', and is used in |
|
|
86 |
forming output file names. If M ETAFONT |
|
|
87 |
doesn't get a file name in the first line, the jobname is |
|
|
88 |
''mfput''. The default extension, ''.mf'', can be |
|
|
89 |
overridden by specifying an extension |
|
|
90 |
explicitly. |
|
|
91 |
|
|
|
92 |
|
|
|
93 |
A log of error messages goes into the file |
|
|
94 |
''jobname''__.__''log''. The output files are |
|
|
95 |
''jobname''__.__''tfm'' and |
|
|
96 |
''jobname''__.__''''number'''', where |
|
|
97 |
''mode'' in this example is shown |
|
|
98 |
generically as |
|
|
99 |
''localfont'' (see below) must be substituted. If |
|
|
100 |
the mode is not specified or is not valid for your site, M |
|
|
101 |
ETAFONT will default to ''proof'' mode |
|
|
102 |
which produces large character images for use in font design |
|
|
103 |
and refinement. Proof mode can be recognized by the suffix |
|
|
104 |
''.2602gf'' after the jobname. Examples of proof mode |
|
|
105 |
output can be found in ''Computer Modern Typefaces'' |
|
|
106 |
(Volume E of ''Computers and Typesetting''). The system |
|
|
107 |
of ''magsteps'' is identical to the system used by TEX, |
|
|
108 |
with values generally in the range 0.5, 1.0, 2.0, 3.0, 4.0 |
|
|
109 |
and 5.0. A listing of ''gf'' numbers for 118-dpi, 240-dpi |
|
|
110 |
and 300-dpi fonts is shown below. |
|
|
111 |
|
|
|
112 |
|
|
|
113 |
MAGSTEP 118 dpi 240 dpi 300 dpi |
|
|
114 |
mag=magstep(0) 118 240 300 |
|
|
115 |
mag=magstep(0.5) 129 263 329 |
|
|
116 |
mag=magstep(1) 142 288 360 |
|
|
117 |
mag=magstep(2) 170 346 432 |
|
|
118 |
mag=magstep(3) 204 415 518 |
|
|
119 |
mag=magstep(4) 245 498 622 |
|
|
120 |
mag=magstep(5) 294 597 746 |
|
|
121 |
Magnification can also be specified not as a magstep but as an arbitrary value, such as 1.315, to create special character sizes. |
|
|
122 |
|
|
|
123 |
|
|
|
124 |
Before font production can begin, it is necessary to set up |
|
|
125 |
the appropriate base files. The minimum set of components |
|
|
126 |
for font production for a given print-engine is the |
|
|
127 |
''plain.mf'' macro file and the local ''mode_def'' |
|
|
128 |
file. The macros in ''plain.mf'' can be studied in an |
|
|
129 |
appendix to the ''M ETAFONT book''; they |
|
|
130 |
were developed by Donald E. Knuth, and this file should |
|
|
131 |
never be altered except when it is officially upgraded. Each |
|
|
132 |
''mode_def'' specification helps adapt fonts to a |
|
|
133 |
particular print-engine. There is a regular discussion of |
|
|
134 |
''mode_def''s in ''TUGboat'', the journal of the TEX |
|
|
135 |
Users Group. The local ones in use on this computer should |
|
|
136 |
be in ''modes.mf''. |
|
|
137 |
|
|
|
138 |
|
|
|
139 |
The ''e'' response to M ETAFONT 's |
|
|
140 |
error-recovery mode invokes the system default editor at the |
|
|
141 |
erroneous line of the source file. There is an environment |
|
|
142 |
variable, MFEDIT, that overrides the default editor. It |
|
|
143 |
should contain a string with |
|
|
144 |
vi__ editor can be set with the |
|
|
145 |
__csh__ command |
|
|
146 |
|
|
|
147 |
|
|
|
148 |
''setenv MFEDIT '' |
|
|
149 |
|
|
|
150 |
|
|
|
151 |
A convenient file in the library is ''null.mf'', |
|
|
152 |
containing nothing. When __mf__ can't find the file it |
|
|
153 |
thinks you want to input, it keeps asking you for another |
|
|
154 |
file name; responding `null' gets you out of the loop if you |
|
|
155 |
don't want to input anything. |
|
|
156 |
!!ONLINE GRAPHICS OUTPUT |
|
|
157 |
|
|
|
158 |
|
|
|
159 |
M ETAFONT can use most modern displays, so |
|
|
160 |
you can see its output without printing. Chapter 23 of |
|
|
161 |
''The M ETAFONT book'' describes what you |
|
|
162 |
can do. This implementation of M ETAFONT uses |
|
|
163 |
environment variables to determine which display device you |
|
|
164 |
want to use. First it looks for a variable MFTERM, and then |
|
|
165 |
for TERM. If it can't find either, you get no online output. |
|
|
166 |
Otherwise, the value of the variable determines the device |
2 |
perry |
167 |
to use: __hp2627__, __sun__ (for old !SunView), |
1 |
perry |
168 |
__tek__, __uniterm__ (for an Atari ST Tek 4014 |
|
|
169 |
emulator), __xterm__ (for either X10 or X11). Some of |
|
|
170 |
these devices may not be supported in all M |
|
|
171 |
ETAFONT executables; the choice is made at |
|
|
172 |
compilation time. |
|
|
173 |
|
|
|
174 |
|
|
|
175 |
On some systems, there are two M ETAFONT |
|
|
176 |
binaries, __mf__ and __mfw__. On those systems the |
|
|
177 |
__mfw__ binary supports graphics, while the __mf__ |
|
|
178 |
binary does not. |
|
|
179 |
!!OPTIONS |
|
|
180 |
|
|
|
181 |
|
|
|
182 |
This version of M ETAFONT understands the |
|
|
183 |
following command line options. |
|
|
184 |
|
|
|
185 |
|
|
|
186 |
__--base__ ''base'' |
|
|
187 |
|
|
|
188 |
|
|
|
189 |
Use ''base'' as the name of the base to be used, instead |
|
|
190 |
of the name by which M ETAFONT was called or |
|
|
191 |
a ''%'' line. |
|
|
192 |
|
|
|
193 |
|
|
|
194 |
__--file-line-error-style__ |
|
|
195 |
|
|
|
196 |
|
|
|
197 |
Print error messages in the form ''file:line:error'' |
|
|
198 |
which is similar to the way many compilers format |
|
|
199 |
them. |
|
|
200 |
|
|
|
201 |
|
|
|
202 |
__--help__ |
|
|
203 |
|
|
|
204 |
|
|
|
205 |
Print help message and exit. |
|
|
206 |
|
|
|
207 |
|
|
|
208 |
__--ini__ |
|
|
209 |
|
|
|
210 |
|
|
|
211 |
Be __inimf__, for dumping bases; this is implicitly true |
|
|
212 |
if the program is called as __inimf__. |
|
|
213 |
|
|
|
214 |
|
|
|
215 |
__--interaction__ ''mode'' |
|
|
216 |
|
|
|
217 |
|
|
|
218 |
Sets the interaction mode. The mode can be one of |
|
|
219 |
''batchmode'', ''nonstopmode'', ''scrollmode'', and |
|
|
220 |
''errorstopmode''. The meaning of these modes is the same |
|
|
221 |
as that of the corresponding commands. |
|
|
222 |
|
|
|
223 |
|
|
|
224 |
__--kpathsea-debug__ ''bitmask'' |
|
|
225 |
|
|
|
226 |
|
|
|
227 |
Sets path searching debugging flags according to the |
|
|
228 |
bitmask. See the ''Kpathsea'' manual for |
|
|
229 |
details. |
|
|
230 |
|
|
|
231 |
|
|
|
232 |
__--maketex__ ''fmt'' |
|
|
233 |
|
|
|
234 |
|
|
|
235 |
Enable mktex''fmt'', where ''fmt'' must be |
|
|
236 |
''mf''. |
|
|
237 |
|
|
|
238 |
|
|
|
239 |
__--no-maketex__ ''fmt'' |
|
|
240 |
|
|
|
241 |
|
|
|
242 |
Disable mktex''fmt'', where ''fmt'' must be |
|
|
243 |
''mf''. |
|
|
244 |
|
|
|
245 |
|
|
|
246 |
__--progname__ ''name'' |
|
|
247 |
|
|
|
248 |
|
|
|
249 |
Pretend to be program ''name''. This affects both the |
|
|
250 |
format used and the search paths. |
|
|
251 |
|
|
|
252 |
|
|
|
253 |
__--recorder__ |
|
|
254 |
|
|
|
255 |
|
|
|
256 |
Enable the filename recorder. This leaves a trace of the |
|
|
257 |
files opened for input and output in a file with extension |
|
|
258 |
''.fls''. |
|
|
259 |
|
|
|
260 |
|
|
|
261 |
__--translate-file__ ''tcxname'' |
|
|
262 |
|
|
|
263 |
|
|
|
264 |
Use the ''tcxname'' translation table. |
|
|
265 |
|
|
|
266 |
|
|
|
267 |
__--version__ |
|
|
268 |
|
|
|
269 |
|
|
|
270 |
Print version information and exit. |
|
|
271 |
!!ENVIRONMENT |
|
|
272 |
|
|
|
273 |
|
|
|
274 |
See the Kpathsearch library documentation (the `Path |
|
|
275 |
specifications' node) for the details of how the environment |
|
|
276 |
variables are use when searching. The __kpsewhich__ |
|
|
277 |
utility can be used to query the values of the |
|
|
278 |
variables. |
|
|
279 |
|
|
|
280 |
|
|
|
281 |
If the environment variable TEXMFOUTPUT is set, M |
|
|
282 |
ETAFONT attempts to put its output files in |
|
|
283 |
it, if they cannot be put in the current directory. Again, |
|
|
284 |
see tex(1). |
|
|
285 |
|
|
|
286 |
|
|
|
287 |
MFINPUTS |
|
|
288 |
|
|
|
289 |
|
|
|
290 |
Search path for ''input'' and ''openin'' |
|
|
291 |
files. |
|
|
292 |
|
|
|
293 |
|
|
|
294 |
MFEDIT |
|
|
295 |
|
|
|
296 |
|
|
|
297 |
Command template for switching to editor. |
|
|
298 |
|
|
|
299 |
|
|
|
300 |
MFTERM |
|
|
301 |
|
|
|
302 |
|
|
|
303 |
Determines the online graphics display. If MFTERM is not |
|
|
304 |
set, and DISPLAY is set, the Metafont window support for X |
|
|
305 |
is used. (DISPLAY must be set to a valid X server |
|
|
306 |
specification, as usual.) If neither MFTERM nor DISPLAY is |
|
|
307 |
set, TERM is used to guess the window support to |
|
|
308 |
use. |
|
|
309 |
!!FONT UTILITIES |
|
|
310 |
|
|
|
311 |
|
|
|
312 |
A number of utility programs are available. The following is |
|
|
313 |
a partial list of available utilities and their purpose. |
|
|
314 |
Consult your local M ETAFONT guru for |
|
|
315 |
details. |
|
|
316 |
|
|
|
317 |
|
|
|
318 |
__gftopk__ |
|
|
319 |
|
|
|
320 |
|
|
|
321 |
Takes a ''gf'' file and produces a more tightly packed |
|
|
322 |
''pk'' font file. |
|
|
323 |
|
|
|
324 |
|
|
|
325 |
__gftodvi__ |
|
|
326 |
|
|
|
327 |
|
|
|
328 |
Produces proof sheets for fonts. |
|
|
329 |
|
|
|
330 |
|
|
|
331 |
__gftype__ |
|
|
332 |
|
|
|
333 |
|
|
|
334 |
Displays the contents of a ''gf'' file in mnemonics |
|
|
335 |
and/or images. |
|
|
336 |
|
|
|
337 |
|
|
|
338 |
__pktype__ |
|
|
339 |
|
|
|
340 |
|
|
|
341 |
Mnemonically displays the contents of a ''pk'' |
|
|
342 |
file. |
|
|
343 |
|
|
|
344 |
|
|
|
345 |
__mft__ |
|
|
346 |
|
|
|
347 |
|
|
|
348 |
Formats a source file as shown in ''Computer Modern |
|
|
349 |
Typefaces''. |
|
|
350 |
!!FILES |
|
|
351 |
|
|
|
352 |
|
|
|
353 |
''mf.pool'' |
|
|
354 |
|
|
|
355 |
|
|
|
356 |
Encoded text of M ETAFONT 's |
|
|
357 |
messages. |
|
|
358 |
|
|
|
359 |
|
|
|
360 |
''*.base'' |
|
|
361 |
|
|
|
362 |
|
|
|
363 |
Predigested M ETAFONT base |
|
|
364 |
files. |
|
|
365 |
|
|
|
366 |
|
|
|
367 |
''$TEXMFMAIN/metafont/base/plain.mf'' |
|
|
368 |
|
|
|
369 |
|
|
|
370 |
The standard base. |
|
|
371 |
|
|
|
372 |
|
|
|
373 |
''$TEXMFMAIN/metafont/misc/modes.mf'' |
|
|
374 |
|
|
|
375 |
|
|
|
376 |
The file of ''mode_def''s for your site's various |
|
|
377 |
printers |
|
|
378 |
!!SUGGESTED READING |
|
|
379 |
|
|
|
380 |
|
|
|
381 |
Donald E. Knuth, ''The M ETAFONT book'' |
|
|
382 |
(Volume C of ''Computers and Typesetting''), |
|
|
383 |
Addison-Wesley, 1986, ISBN 0-201-13445-4. |
|
|
384 |
Donald E. Knuth, ''M ETAFONT : The |
|
|
385 |
Program'' (Volume D of ''Computers and Typesetting''), |
|
|
386 |
Addison-Wesley, 1986, ISBN 0-201-13438-1. |
|
|
387 |
Donald E. Knuth, ''Computer Modern Typefaces'' (Volume E |
|
|
388 |
of ''Computers and Typesetting''), Addison-Wesley, 1986, |
|
|
389 |
ISBN 0-201-13446-2.'' |
|
|
390 |
TUGboat'' (the journal of the TEX Users |
|
|
391 |
Group). |
|
|
392 |
!!COMMENTS |
|
|
393 |
|
|
|
394 |
|
|
|
395 |
Warning: ``Type design can be hazardous to your other |
|
|
396 |
interests. Once you get hooked, you will develop intense |
|
|
397 |
feelings about letterforms; the medium will intrude on the |
|
|
398 |
messages that you read. And you will perpetually be thinking |
|
|
399 |
of improvements to the fonts that you see everywhere, |
|
|
400 |
especially those of your own design.'' |
|
|
401 |
!!SEE ALSO |
|
|
402 |
|
|
|
403 |
|
|
|
404 |
gftopk(1), gftodvi(1), gftype(1), |
|
|
405 |
mft(1), pltotf(1), |
|
|
406 |
tftopl(1). |
|
|
407 |
!!BUGS |
|
|
408 |
|
|
|
409 |
|
|
|
410 |
On January 4, 1986 the ``final'' bug in M |
|
|
411 |
ETAFONT was discovered and removed. If an |
|
|
412 |
error still lurks in the code, Donald E. Knuth promises to |
|
|
413 |
pay a finder's fee which doubles every year to the first |
|
|
414 |
person who finds it. Happy hunting. |
|
|
415 |
!!AUTHORS |
|
|
416 |
|
|
|
417 |
|
|
|
418 |
M ETAFONT was designed by Donald E. Knuth, |
|
|
419 |
who implemented it using his W EB system for |
|
|
420 |
Pascal programs. It was originally ported to Unix by Paul |
|
|
421 |
Richards at the University of Illinois at Urbana-Champaign. |
2 |
perry |
422 |
This page was mostly written by Pierre !MacKay. |
1 |
perry |
423 |
---- |