diff options
Diffstat (limited to 'Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html')
-rw-r--r-- | Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html | 129 |
1 files changed, 70 insertions, 59 deletions
diff --git a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html index d3eb8137324..87d2f2d6d84 100644 --- a/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html +++ b/Master/texmf-dist/doc/generic/FAQ-en/html/FAQ-useMF.html @@ -3,105 +3,116 @@ </head><body> <h3>Getting Metafont to do what you want</h3> <p/>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 -<code>mode_def</code> convention described on page 94 of <em>The Metafontbook</em> +will never need to use it — modern (La)TeX systems contain +rather few Metafont fonts of any significance, and when Metafont output is +needed the font generation is done, automatically, “on the fly”. +<p/>If you find you have some special requirement that the system doesn’t +satisfy, you need to know about Metafont in rather more detail. Metafont, +unlike TeX, requires customisation for each output device: such +customisation is conventionally held in a “mode” associated with the +device. Modes are commonly defined using the <code>mode_def</code> +convention described on page 94 of <em>The Metafontbook</em> (see <a href="FAQ-books.html">TeX-related books</a>). You will need -a file, which conventionally called <i>local.mf</i>, containing all the -<code>mode_def</code>s you will be using. If <i>local.mf</i> doesn’t already -exist, Karl Berry’s collection of modes (<i>modes.mf</i>) -is a good starting point -(it can be used as a ‘<i>local.mf</i>’ without modification in a ‘big -enough’ implementation of Metafont). Lists of +a file, conventionally called <i>local.mf</i>, containing all the +<code>mode_def</code>s you will be using. In the unlikely event that +<i>local.mf</i> doesn’t already exist, Karl Berry’s collection of +modes (<i>modes.mf</i>) is a good starting point +(it can be used as a ‘<i>local.mf</i>’ without modification in a +typical modern implementation of Metafont). Lists of settings for various output devices are also published periodically in <i>TUGboat</i> (see <a href="FAQ-TUGstar.html">TUG</a>). Now create -a <code>plain</code> base -file using <i>inimf</i>, <code>plain.mf</code>, and <code>local.mf</code>: +a <code>plain</code> base file using <i>mf</i> (in “initialisation” +mode), <code>plain.mf</code>, and <code>local.mf</code>: +<blockquote> <pre> - % 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) +% mf -ini +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) </pre> +</blockquote><p> -This will create a base file named <i>plain.base</i> (or something -similar; for example, it will be - - <i>PLAIN.BAS</i> -on MSDOS systems) which should be moved to the directory containing -the base files on your system (note that some systems have two or more -such directories, one for each ‘size’ of Metafont used). +This will create a base file named <i>plain.base</i> +(or something similar; for example, it will be <i>PLAIN.BAS</i> +on MSDOS systems). Move the file to the directory containing +the base files on your system. <p/>Now you need to make sure Metafont loads this new base when it starts up. If Metafont loads the <code>plain</code> base by default on your system, then you’re -ready to go. Under Unix (using the default <i>web2c</i> -distribution -) -this does indeed happen, but we could for instance define a command -<i>mf</i> which executes <code>virmf &plain</code> loading the -<code>plain</code> base file. -<p/>The usual way to create a font with <code>plain</code> Metafont is to start -it with the +ready to go. Under Unix (using the default TeX Live (and earlier) +distributions this does indeed happen, but we could for instance +define a command <i>plainmf</i> + +which executes ‘<code>mf -base=plain</code>’ (or, in more traditional +style ‘<code>mf &plain</code>’) which loads the <code>plain</code> base +file. +<p/>The usual way to create a font with Metafont (with an appropriate base +file loaded) is to start Metafont’s input with the line <pre> \mode=<mode name>; mag=<magnification>; input <font file name> </pre> in response to the ‘<code>**</code>’ prompt or on the Metafont command line. (If -<code><mode name></code> is unknown or omitted, the mode defaults to ‘proof’ and -Metafont will produce an output file called - +<code><mode name></code> is unknown or omitted, the mode defaults to +‘proof’ mode and Metafont will produce an output file called <i><font file name>.2602gf</i>) The <code><magnification></code> is a floating point number or ‘magstep’ (magsteps are defined in <em>The Metafontbook</em> and <em>The TeXbook</em>). If <code>mag=<magnification></code> is omitted, then the default -is 1 (magstep 0). For example, to generate cmr10 at 12pt for an epson -printer you would type +is 1 (magstep 0). For example, to generate cmr10 at 12pt for an Epson +printer you might type +<blockquote> <pre> - mf \mode=epson; mag=magstep 1; input cmr10 +mf \mode=epson; mag=magstep 1; input cmr10 </pre> +</blockquote><p> Note that under Unix the <code>\</code> and <code>;</code> characters must usually be quoted or escaped, so this would typically look something like +<blockquote> <pre> mf '\mode=epson; mag=magstep 1; input cmr10' </pre> -<p/>If you don’t have <i>inimf</i> or need a special mode that isn’t -in the base, you can put its commands in a file (<em>e.g.</em>, -<i>ln03.mf</i>) and invoke it on the fly with the <code>\</code><code>smode</code> command. -For example, to create <i>cmr10.300gf</i> for an LN03 printer, using -the file +</blockquote><p> +If you need a special mode that isn’t in the base, you can put its +commands in a file (<em>e.g.</em>, <i>ln03.mf</i>) and invoke it on the +fly with the <code>\</code><code>smode</code> command. For example, to create +<i>cmr10.300gf</i> for an LN03 printer, using the file +<blockquote> <pre> - % 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; +% 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; </pre> +</blockquote><p> (note the absence of the <code>mode_def</code> and <code>enddef</code> commands), you would type +<blockquote> <pre> - mf \smode="ln03"; input cmr10 +mf \smode="ln03"; input cmr10 </pre> +</blockquote><p> 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. -<p/>Other sources of help are mentioned in +<p/>Other sources of help are discussed in our list of <a href="FAQ-mfptutorials.html">Metafont and MetaPost Tutorials</a>. <dl> -<dt><tt><i>modes.mf</i></tt><dd><a href="ftp://cam.ctan.org/tex-archive/fonts/modes/modes.mf">fonts/modes/modes.mf</a> +<dt><tt><i>modes.mf</i></tt><dd><a href="http://www.tex.ac.uk/www.tex.ac.uk tex-archivefonts/modes/modes.mf">fonts/modes/modes.mf</a> </dl> <p/><p>This question on the Web: <a href="http://www.tex.ac.uk/cgi-bin/texfaq2html?label=useMF">http://www.tex.ac.uk/cgi-bin/texfaq2html?label=useMF</a> </body> |