Whole document tree METAFONTGetting METAFONT to do what you want
METAFONT allows you to create your own fonts, and most TeX users
will never need to use it. METAFONT, unlike TeX, requires some
customisation: each output device for which you will be generating
fonts needs a mode associated with it. Modes are defined using the
% inimf This is METAFONT... **plain # you type plain (output) *input local # you type this (output) *dump # you type this Beginning to dump on file plain... (output)
This will create a base file named
Now you need to make sure METAFONT loads this new base when it starts up. If
METAFONT loads the
The usual way to create a font with \mode=<mode name>; mag=<magnification>; input <font file name>
in
response to the `**' prompt or on the METAFONT command line. (If
mf \mode=epson; mag=magstep 1; input cmr10
Note that under Unix the mf '\mode=epson; mag=magstep 1; input cmr10'
If you don't have inimf or need a special mode that isn't
in the base, you can put its commands in a file (e.g.,
% This is ln03.mf as of 1990/02/27 % mode_def courtesy of John Sauter proofing:=0; fontmaking:=1; tracingtitles:=0; pixels_per_inch:=300; blacker:=0.65; fillin:=-0.1; o_correction:=.5;
(note the absence of the mf \smode="ln03"; input cmr10 This technique isn't one you should regularly use, but it may prove useful if you acquire a new printer and want to experiment with parameters, or for some other reason are regularly editing the parameters you're using. Once you've settled on an appropriate set of parameters, you should use them to rebuild the base file that you use.
A summary of the above written by Geoffrey Tobin, and tips about
common pitfalls in using METAFONT, is available as Which font files should be kept
METAFONT produces from its run three files, a metrics (TFM) file, a
generic font (GF) file, and a log file; all of these files have the
same base name as does the input (e.g., if the input file was
For TeX to use the font, you need a TFM file, so you need to keep that. However, you are likely to generate the same font at more than one magnification, and each time you do so you'll (incidentally) generate another TFM file; these files are all the same, so you only need to keep one of them. To preview or to produce printed output, the DVI processor will need a font raster file; this is what the GF file provides. However, while there used (once upon a time) to be DVI processors that could use GF files, modern processors use packed raster (PK) files. Therefore, you need to generate a PK file from the GF file; the program gftopk does this for you, and once you've done that you may throw the GF file away. The log file should never need to be used, unless there was some sort of problem in the METAFONT run, and need not be ordinarily kept. Getting bitmaps from the archives
Most people these days start using TeX with a 300 dots-per-inch (dpi)
laser printer, and Computer Modern bitmap fonts for this resolution
are supplied with most TeX packages. There are also two such sets
available on CTAN:
So what to do? You can build the fonts you need yourself with METAFONT:
this isn't at all hard, and some drivers help you (dvips, and the
emTeX drivers construct the METAFONT commands). You might need to look
at Karl Berry's collection of METAFONT modes ( Go to the first, previous, next, last section, table of contents. |