# mf-nowin(1) - man - phpMan

[MF(1)](https://www.chedong.com/phpMan.php/man/MF/1/markdown)                                  General Commands Manual                                 [MF(1)](https://www.chedong.com/phpMan.php/man/MF/1/markdown)



## NAME
       mf, inimf, mf-nowin - Metafont, a language for font and logo design

## SYNOPSIS
       **mf** [_options_] [_commands_]

## DESCRIPTION
       Metafont reads the program in the specified files and outputs font rasters (in _gf_ format) and
       font metrics (in _tfm_ format).  The Metafont language is described in _The_ _Metafontbook_.

       Like TeX, Metafont is normally used with a large body of precompiled macros, and font genera‐
       tion  in  particular  requires  the support of several macro files.  This version of Metafont
       looks at its command line to see what name it was called under.  Both  **inimf**  and  **virmf**  are
       symlinks  to  the  **mf** executable.  When called as **inimf** (or when the **-ini** option is given) it
       can be used to precompile macros into a _.base_ file.  When called as **virmf**  it  will  use  the
       _plain_ base.  When called under any other name, Metafont will use that name as the name of the
       base to use.  For example, when called as **mf** the _mf_ base is used, which is identical  to  the
       _plain_ base.  Other bases than _plain_ are rarely used.

       The  _commands_ given on the command line to the Metafont program are passed to it as the first
       input line.  (But it is often easier to type extended arguments  as  the  first  input  line,
       since  UNIX  shells tend to gobble up or misinterpret Metafont's favorite symbols, like semi‐
       colons, unless you quote them.)  As described in _The_ _Metafontbook_, that first line should be‐
       gin with a filename, a \_controlsequence_, or a _&basename_.

       The normal usage is to say

              **mf**  '\mode=<printengine>; [mag=[magstep(_n_)](https://www.chedong.com/phpMan.php/man/magstep/n/markdown);]' input  _font_

       to  start  processing  _font.mf_.  The single quotes are the best way of keeping the Unix shell
       from misinterpreting the semicolons and from removing the \ character, which is  needed  here
       to keep Metafont from thinking that you want to produce a font called _mode_.  (Or you can just
       say _mf_ and give the other stuff on the next line, without quotes.)  Other control  sequences,
       such  as  _batchmode_ (for silent operation) can also appear.  The name _font_ will be the ``job‐
       name'', and is used in forming output file names.  If Metafont doesn't get a file name in the
       first  line, the jobname is _mfput_.  The default extension, _.mf_, can be overridden by specify‐
       ing an extension explicitly.

       A log of error messages goes into the file _jobname_**.**_log_.  The output files are _jobname_**.**_tfm_ and
       _jobname_**.**_<_number_>gf_,  where  <number> depends on the resolution and magnification of the font.
       The _mode_ in this example is shown generically as <printengine>, a symbolic term for which the
       name  of  an  actual device or, most commonly, the name _localfont_ (see below) must be substi‐
       tuted.  If the mode is not specified or is not valid for your site, Metafont will default  to
       _proof_  mode  which  produces  large  character  images for use in font design and refinement.
       Proof mode can be recognized by the suffix _.2602gf_ after the jobname.  Examples of proof mode
       output  can  be  found  in _Computer_ _Modern_ _Typefaces_ (Volume E of _Computers_ _and_ _Typesetting_).
       The system of _magsteps_ is identical to the system used by TeX, with values generally  in  the
       range  0.5,  1.0,  2.0,  3.0,  4.0 and 5.0.  A listing of _gf_ numbers for 118-dpi, 240-dpi and
       300-dpi fonts is shown below.

           MAGSTEP        118 dpi   240 dpi   300 dpi
       mag=[magstep(0)](https://www.chedong.com/phpMan.php/man/magstep/0/markdown)     118       240       300
       mag=magstep(0.5)   129       263       329
       mag=[magstep(1)](https://www.chedong.com/phpMan.php/man/magstep/1/markdown)     142       288       360
       mag=[magstep(2)](https://www.chedong.com/phpMan.php/man/magstep/2/markdown)     170       346       432
       mag=[magstep(3)](https://www.chedong.com/phpMan.php/man/magstep/3/markdown)     204       415       518
       mag=[magstep(4)](https://www.chedong.com/phpMan.php/man/magstep/4/markdown)     245       498       622
       mag=[magstep(5)](https://www.chedong.com/phpMan.php/man/magstep/5/markdown)     294       597       746

       Magnification can also be specified not as a magstep but  as  an  arbitrary  value,  such  as
       1.315, to create special character sizes.

       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 _Metafontbook_; they were developed by Donald E. Knuth, and this file should never  be  al‐
       tered  except  when it is officially upgraded.  Each _mode_def_ specification helps adapt fonts
       to a particular print-engine.  There is a regular discussion of  _mode_def_s  in  _TUGboat_,  the
       journal  of  the  TeX  Users  Group.   The  local  ones  in use on this computer should be in
       _modes.mf_.

       The _e_ response to Metafont's error-recovery mode invokes the system default editor at the er‐
       roneous  line  of  the source file.  There is an environment variable, MFEDIT, that overrides
       the default 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 MFEDIT
       string for the **vi** editor can be set with the **csh** command
              _setenv_ _MFEDIT_ _"vi_ _+%d_ _%s"_

       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.

## ONLINE GRAPHICS OUTPUT
       Metafont can use most modern displays, so you can see its output without  printing.   Chapter
       23 of _The_ _Metafontbook_ describes what you can do.  This implementation of Metafont uses envi‐
       ronment variables to determine which display device you want to use.  First it  looks  for  a
       variable MFTERM, and then for TERM.  If it can't find either, you get no online output.  Oth‐
       erwise, the value of the variable determines the device to use: **hp2627**,  **sun**  (for  old  Sun‐
       View), **tek**, **uniterm** (for an Atari ST Tek 4014 emulator), **xterm** (for either X10 or X11).  Some
       of these devices may not be supported in all Metafont executables; the choice is made at com‐
       pilation time.

       On  some  systems, there are two Metafont binaries, **mf** and **mf-nowin**.  On those systems the **mf**
       binary supports graphics, while the **mf-nowin** binary does not.  The **mf-nowin** binary is used by
       scripts like **mktexpk** where graphics support is a nuisance rather than something helpful.

## OPTIONS
       This version of Metafont understands the following command line options.

### -base
              Use _base_ as the name of the base to be used, instead of the name by which Metafont was
              called or a _%&_ line.

### -cnf-line
              Parse _string_ as a _texmf.cnf_ configuration line.  See the Kpathsea manual.

### -file-line-error
              Print error messages in the form _file:line:error_ which is similar to the way many com‐
              pilers format them.

### -no-file-line-error
              Disable printing error messages in the _file:line:error_ style.

### -file-line-error-style
              This is the old name of the **-file-line-error** option.

### -halt-on-error
              Exit with an error code when an error is encountered during processing.

### -help

### -ini
              **imf**.

### -interaction
              Sets the interaction mode.  The mode can be one of _batchmode_, _nonstopmode_, _scrollmode_,
              and  _errorstopmode_.  The meaning of these modes is the same as that of the correspond‐
              ing commands.

### -jobname
              Use _name_ for the job name, instead of deriving it from the name of the input file.

### -kpathsea-debug
              Sets path searching debugging flags according to the bitmask.  See the _Kpathsea_ manual
              for details.

### -maketex
              Enable mktex_fmt_, where _fmt_ must be _mf_.

### -no-maketex
              Disable mktex_fmt_, where _fmt_ must be _mf_.

### -output-directory
              Write output files in _directory_ instead of the current directory.  Look up input files
              in _directory_ first, the along the normal search path.

### -parse-first-line
              If the first line of the main input file begins with _%&_ parse it to look  for  a  dump
              name or a **-translate-file** option.

### -no-parse-first-line
              Disable parsing of the first line of the main input file.

### -progname
              Pretend to be program _name_.  This affects both the format used and the search paths.

### -recorder
              Enable  the  filename recorder.  This leaves a trace of the files opened for input and
              output in a file with extension _.fls_.

### -translate-file
              Use the _tcxname_ translation table.

### -version
              Print version information and exit.

## ENVIRONMENT
       See the Kpathsearch library documentation (the `Path specifications' node) for the details of
       how  the  environment variables are use when searching.  The **kpsewhich** utility can be used to
       query the values of the variables.

       If the environment variable **TEXMFOUTPUT** is set, Metafont attempts to put its output files  in
       it, if they cannot be put in the current directory.  Again, see [**tex**(1)](https://www.chedong.com/phpMan.php/man/tex/1/markdown).

       **MFINPUTS**
              Search path for _input_ files.

       **MFEDIT** Command template for switching to editor.

       **MFTERM** Determines the online graphics display.  If MFTERM is not set, and DISPLAY is set, the
              Metafont window support for X is used.  (DISPLAY must be set to a valid X server spec‐
              ification, as usual.)  If neither MFTERM nor DISPLAY is set, TERM is used to guess the
              window support to use.

## FONT UTILITIES
       A number of utility programs are available.  The following is a  partial  list  of  available
       utilities and their purpose.  Consult your local Metafont guru for details.

       **gftopk**   Takes a _gf_ file and produces a more tightly packed _pk_ font file.

       **gftodvi**  Produces proof sheets for fonts.

       **gftype**   Displays the contents of a _gf_ file in mnemonics and/or images.

       **pktype**   Mnemonically displays the contents of a _pk_ file.

       **mft**      Formats a source file as shown in _Computer_ _Modern_ _Typefaces_.

## FILES
       _mf.pool_
              Encoded text of Metafont's messages.

       _*.base_ Predigested Metafont base files.

       _$TEXMFMAIN/metafont/base/plain.mf_
              The standard base.

       _$TEXMFMAIN/metafont/misc/modes.mf_
              The file of _mode_def_s for your site's various printers

## NOTES
       This  manual page is not meant to be exhaustive.  The complete documentation for this version
       of Metafont can be found in the info manual _Web2C:_ _A_ _TeX_ _implementation_.

## BUGS
       On January 4, 1986 the ``final'' bug in Metafont was discovered and  removed.   If  an  error
       still  lurks  in the code, Donald E. Knuth promises to pay a finder's fee which doubles every
       year to the first person who finds it.  Happy hunting.

## SUGGESTED READING
       Donald E. Knuth, _The_ _Metafontbook_ (Volume C of _Computers_  _and_  _Typesetting_),  Addison-Wesley,
       1986, ISBN 0-201-13445-4.
       Donald  E. Knuth, _Metafont:_ _The_ _Program_ (Volume D of _Computers_ _and_ _Typesetting_), Addison-Wes‐
       ley, 1986, ISBN 0-201-13438-1.
       Donald E. Knuth, _Computer_ _Modern_ _Typefaces_ (Volume E of _Computers_ _and_ _Typesetting_),  Addison-
       Wesley, 1986, ISBN 0-201-13446-2.
       _TUGboat_ (the journal of the TeX Users Group).

## 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 ev‐
       erywhere, especially those of your own design.''

## SEE ALSO
       [**gftopk**(1)](https://www.chedong.com/phpMan.php/man/gftopk/1/markdown), [**gftodvi**(1)](https://www.chedong.com/phpMan.php/man/gftodvi/1/markdown), [**gftype**(1)](https://www.chedong.com/phpMan.php/man/gftype/1/markdown), [**mft**(1)](https://www.chedong.com/phpMan.php/man/mft/1/markdown), [**mpost**(1)](https://www.chedong.com/phpMan.php/man/mpost/1/markdown), [**pltotf**(1)](https://www.chedong.com/phpMan.php/man/pltotf/1/markdown), [**tftopl**(1)](https://www.chedong.com/phpMan.php/man/tftopl/1/markdown).

## AUTHORS
       Metafont was designed by Donald E. Knuth, who implemented it using his Web system for  Pascal
       programs.  It was originally ported to Unix by Paul Richards at the University of Illinois at
       Urbana-Champaign.  This page was mostly written by Pierre MacKay.



Web2C 2022/dev                              6 August 2019                                      [MF(1)](https://www.chedong.com/phpMan.php/man/MF/1/markdown)
