


MF(1)                                                       MF(1)


NNAAMMEE
       mf,  inimf, virmf - Metafont, a language for font and logo
       design

SSYYNNOOPPSSIISS
       mmff [_o_p_t_i_o_n_s] [_c_o_m_m_a_n_d_s]

DDEESSCCRRIIPPTTIIOONN
       This manual page is not meant to be exhaustive.  The  com-
       plete  documentation  for this version of TeX can be found
       in the info file or manual _W_e_b_2_C_: _A _T_e_X _i_m_p_l_e_m_e_n_t_a_t_i_o_n.

       Metafont reads the program in the specified files and out-
       puts  font rasters (in _g_f format) and font metrics (in _t_f_m
       format).   The  Metafont  language  is  described  in  _T_h_e
       _M_e_t_a_f_o_n_t_b_o_o_k.

       Like  TeX,  Metafont is normally used with a large body of
       precompiled macros,  and  font  generation  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 iinniimmff and vviirrmmff are symlinks to
       the mmff executable.  When called  as  iinniimmff  (or  when  the
       ----iinnii option is given) it can be used to precompile macros
       into a _._b_a_s_e file.  When called as vviirrmmff it will  use  the
       _p_l_a_i_n  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 mmff the _m_f base is used, which is
       identical to the _p_l_a_i_n base.  Other bases than  _p_l_a_i_n  are
       rarely used.

       The  _c_o_m_m_a_n_d_s  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  misin-
       terpret  Metafont's  favorite  symbols,  like  semicolons,
       unless you quote them.)  As described in _T_h_e _M_e_t_a_f_o_n_t_b_o_o_k,
       that  first  line  should  begin  with a filename, a \_c_o_n_-
       _t_r_o_l_s_e_q_u_e_n_c_e, or a _&_b_a_s_e_n_a_m_e.

       The normal usage is to say

              mmff  '\mode=<printengine>; [mag=magstep(_n);]' input
              _f_o_n_t

       to  start  processing  _f_o_n_t_._m_f.  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 _m_o_d_e.  (Or you can just say _m_f
       and give  the  other  stuff  on  the  next  line,  without
       quotes.)  Other  control sequences, such as _b_a_t_c_h_m_o_d_e (for
       silent operation) can also appear.  The name _f_o_n_t will  be
       the ``jobname'', and is used in forming output file names.



Web2C 7.2                  27 May 1994                          1





MF(1)                                                       MF(1)


       If Metafont doesn't get a file name in the first line, the
       jobname  is  _m_f_p_u_t.   The  default  extension, _._m_f, can be
       overridden by specifying an extension explicitly.

       A log of error messages goes into  the  file  _j_o_b_n_a_m_e.._l_o_g.
       The  output  files are _j_o_b_n_a_m_e.._t_f_m and _j_o_b_n_a_m_e.._<number_>_g_f,
       where <number> depends on the resolution and magnification
       of  the  font.   The _m_o_d_e in this example is shown generi-
       cally as <printengine>, a symbolic term for which the name
       of  an actual device or, most commonly, the name _l_o_c_a_l_f_o_n_t
       (see below) must be substituted. If the mode is not speci-
       fied  or is not valid for your site, Metafont will default
       to _p_r_o_o_f mode which produces large  character  images  for
       use in font design and refinement.  Proof mode can be rec-
       ognized by the suffix _._2_6_0_2_g_f after the jobname.  Examples
       of proof mode output can be found in _C_o_m_p_u_t_e_r _M_o_d_e_r_n _T_y_p_e_-
       _f_a_c_e_s (Volume E of _C_o_m_p_u_t_e_r_s _a_n_d _T_y_p_e_s_e_t_t_i_n_g).  The system
       of  _m_a_g_s_t_e_p_s  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  _g_f numbers for 118-dpi, 240-dpi and
       300-dpi fonts is shown below.
                 MAGSTEP        118 dpi   240 dpi   300 dpi
             mag=magstep(0)       118       240       300
             mag=magstep(0.5)     129       263       329
             mag=magstep(1)       142       288       360
             mag=magstep(2)       170       346       432
             mag=magstep(3)       204       415       518
             mag=magstep(4)       245       498       622
             mag=magstep(5)       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 compo-
       nents for font production for a given print-engine is  the
       _p_l_a_i_n_._m_f  macro  file  and  the  local _m_o_d_e___d_e_f file.  The
       macros in _p_l_a_i_n_._m_f can be studied in an  appendix  to  the
       _M_e_t_a_f_o_n_t_b_o_o_k;  they were developed by Donald E. Knuth, and
       this file should never be altered except when it is  offi-
       cially  upgraded.  Each _m_o_d_e___d_e_f specification helps adapt
       fonts to a particular print-engine.  There  is  a  regular
       discussion of _m_o_d_e___d_e_fs in _T_U_G_b_o_a_t, the journal of the TeX
       Users Group.  The local  ones  in  use  on  this  computer
       should be in _m_o_d_e_s_._m_f.

       The  _e  response to Metafont's error-recovery mode invokes
       the system default editor at the  erroneous  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 vvii editor can



Web2C 7.2                  27 May 1994                          2





MF(1)                                                       MF(1)


       be set with the ccsshh command
              _s_e_t_e_n_v _M_F_E_D_I_T _"_/_u_s_r_/_u_c_b_/_v_i _+_%_d _%_s_"

       A convenient file in the library  is  _n_u_l_l_._m_f,  containing
       nothing.   When  mmff 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.

OONNLLIINNEE GGRRAAPPHHIICCSS OOUUTTPPUUTT
       Metafont can use most modern displays, so you can see  its
       output  without  printing.  Chapter 23 of _T_h_e _M_e_t_a_f_o_n_t_b_o_o_k
       describes what you can do.  This implementation  of  Meta-
       font uses environment 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.  Otherwise, the value of  the  vari-
       able  determines  the  device to use: hhpp22662277, ssuunn (for old
       SunView), tteekk, uunniitteerrmm (for an Atari ST  Tek  4014  emula-
       tor),  xxtteerrmm  (for  either  X10  or  X11).   Some of these
       devices may not be supported in all Metafont  executables;
       the choice is made at compilation time.

OOPPTTIIOONNSS
       This version of Metafont understands the following command
       line options.

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

       ----hheellpp Print help message and exit.

       ----iinnii  Be iinniimmff, for dumping  bases;  this  is  implicitly
              true if the program is called as iinniimmff.

       ----iinntteerraaccttiioonn _m_o_d_e
              Sets  the interaction mode.  The mode can be one of
              _b_a_t_c_h_m_o_d_e, _n_o_n_s_t_o_p_m_o_d_e, _s_c_r_o_l_l_m_o_d_e, and  _e_r_r_o_r_s_t_o_p_-
              _m_o_d_e.   The  meaning  of these modes is the same as
              that of the corresponding commands.

       ----kkppaatthhsseeaa--ddeebbuugg _b_i_t_m_a_s_k
              Sets path searching debugging  flags  according  to
              the  bitmask.  See the _K_p_a_t_h_s_e_a manual for details.

       ----mmaakkeetteexx _f_m_t
              Enable mktex_f_m_t, where _f_m_t must be _m_f.

       ----nnoo--mmaakkeetteexx _f_m_t
              Disable mktex_f_m_t, where _f_m_t must be _m_f.





Web2C 7.2                  27 May 1994                          3





MF(1)                                                       MF(1)


       ----pprrooggnnaammee _n_a_m_e
              Pretend to be program _n_a_m_e.  This affects both  the
              format used and the search paths.

       ----vveerrssiioonn
              Print version information and exit.

EENNVVIIRROONNMMEENNTT
       See the Kpathsearch library documentation (the `Path spec-
       ifications' node) for the details of how  the  environment
       variables  are  use when searching.  The kkppsseewwhhiicchh 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 tteexx(1).

       MFINPUTS
              Search path for _i_n_p_u_t and _o_p_e_n_i_n 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 specification, as usual.)  If nei-
              ther MFTERM nor DISPLAY is set,  TERM  is  used  to
              guess the window support to use.

FFOONNTT UUTTIILLIITTIIEESS
       A number of utility programs are available.  The following
       is a partial list of available utilities  and  their  pur-
       pose.  Consult your local Metafont guru for details.

       ggffttooppkk   Takes  a  _g_f  file  and  produces  a more tightly
                packed _p_k font file.

       ggffttooddvvii  Produces proof sheets for fonts.

       ggffttyyppee   Displays the contents of a _g_f file  in  mnemonics
                and/or images.

       ppkkttyyppee   Mnemonically  displays the contents of a _p_k file.

       mmfftt      Formats a source file as shown in _C_o_m_p_u_t_e_r _M_o_d_e_r_n
                _T_y_p_e_f_a_c_e_s.

FFIILLEESS
       _m_f_._p_o_o_l
              Encoded text of Metafont's messages.

       _*_._b_a_s_e Predigested Metafont base files.





Web2C 7.2                  27 May 1994                          4





MF(1)                                                       MF(1)


       _$_T_E_X_M_F_M_A_I_N_/_m_e_t_a_f_o_n_t_/_b_a_s_e_/_p_l_a_i_n_._m_f
              The standard base.

       _$_T_E_X_M_F_M_A_I_N_/_m_e_t_a_f_o_n_t_/_m_i_s_c_/_m_o_d_e_s_._m_f
              The  file  of  _m_o_d_e___d_e_fs  for  your  site's various
              printers

SSUUGGGGEESSTTEEDD RREEAADDIINNGG
       Donald E. Knuth, _T_h_e _M_e_t_a_f_o_n_t_b_o_o_k (Volume C  of  _C_o_m_p_u_t_e_r_s
       _a_n_d     _T_y_p_e_s_e_t_t_i_n_g),     Addison-Wesley,    1986,    ISBN
       0-201-13445-4.
       Donald E. Knuth, _M_e_t_a_f_o_n_t_: _T_h_e _P_r_o_g_r_a_m (Volume D  of  _C_o_m_-
       _p_u_t_e_r_s   _a_n_d   _T_y_p_e_s_e_t_t_i_n_g),  Addison-Wesley,  1986,  ISBN
       0-201-13438-1.
       Donald E. Knuth, _C_o_m_p_u_t_e_r _M_o_d_e_r_n _T_y_p_e_f_a_c_e_s  (Volume  E  of
       _C_o_m_p_u_t_e_r_s  _a_n_d  _T_y_p_e_s_e_t_t_i_n_g),  Addison-Wesley,  1986, ISBN
       0-201-13446-2.
       _T_U_G_b_o_a_t (the journal of the TeX Users Group).

CCOOMMMMEENNTTSS
       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  every-
       where, especially those of your own design.''

SSEEEE AALLSSOO
       ggffttooppkk(1),   ggffttooddvvii(1),   ggffttyyppee(1),  mmfftt(1),  ppllttoottff(1),
       ttffttooppll(1).

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

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













Web2C 7.2                  27 May 1994                          5


