home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / utility / text / tex31.lzh / TeX / man / mf.doc < prev    next >
Encoding:
Text File  |  1990-12-21  |  10.5 KB  |  330 lines

  1.  
  2.  
  3.  
  4. MF(1)                    USER COMMANDS                      MF(1)
  5.  
  6.  
  7.  
  8. NAME
  9.      mf, inimf  - Metafont, a language for alphabet design
  10.  
  11. SYNOPSIS
  12.      mf [ first line ]
  13.  
  14.      inimf [ first line ]
  15.  
  16.      virmf [ first line ]
  17.  
  18. DESCRIPTION
  19.      METAFONT reads the program in the specified files  and  out-
  20.      puts  font  rasters  (in gf format) and font metrics (in tfm
  21.      format).  METAFONT capabilities and language  are  described
  22.      in  The  METAFONTbook  by  Donald  E.  Knuth,  published  by
  23.      Addison-Wesley.
  24.  
  25.      Like TeX , METAFONT is normally used with a  large  body  of
  26.      precompiled   macros,  and  font  generation  in  particular
  27.      requires the support of several macro files.  The basic pro-
  28.      gram  as compiled is called inimf; it can be used to precom-
  29.      pile macros into a .base file.  The virmf variant is used to
  30.      reload  the .base files quickly.  Typically, virmf has links
  31.      to it by the names of the various base files.  For  example,
  32.      if  you  link foo to virmf and then execute the program foo,
  33.      you get the base file foo.base.  You can  load  a  different
  34.      base by saying, e.g., virmf&mybase.
  35.  
  36.      As described in The METAFONTbook, the command line (or first
  37.      input  line)  should  otherwise  begin with a file name or a
  38.      \controlsequence.  The normal usage is to say
  39.  
  40.           mf   '\mode=<printengine>;  [mag=magstep(n);]'   input
  41.           font
  42.  
  43.      to start processing font.mf.  The single quotes are the best
  44.      way  of  keeping  your  shell from misinterpreting the semi-
  45.      colons and from removing the \ character,  which  is  needed
  46.      here to keep METAFONT from thinking that you want to produce
  47.      a font called ``mode''. (Or you can just say mf and give the
  48.      other stuff on the next line, without quotes.) Other control
  49.      sequences, such as batchmode (for silent operation) can also
  50.      appear.  The  name  ``font'' will be the ``jobname'', and is
  51.      used in forming output file names.  If METAFONT doesn't  get
  52.      a  file  name  in  the first line, the jobname is ``mfput''.
  53.      The default extension, .mf, can be overridden by  specifying
  54.      an extension explicitly.
  55.  
  56.      A log of error messages goes into the file jobname.log.  The
  57.      output  files  are jobname.tfm and jobname.<number>gf, where
  58.      <number> depends on the resolution and magnification of  the
  59.      font.   The ``mode'' in this example is shown generically as
  60.  
  61.  
  62.  
  63.                       Last change: 9/25/90                      1
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. MF(1)                    USER COMMANDS                      MF(1)
  71.  
  72.  
  73.  
  74.      <printengine>, a symbolic term for  which  the  name  of  an
  75.      actual  device or the name ``localfont'' (see below) must be
  76.      substituted. If the mode is not specified or  is  not  valid
  77.      for your site, METAFONT will default to ``proof'' mode which
  78.      produces large character images for use in font  design  and
  79.      refinement.   Proof  mode  can  be  recognized by the suffix
  80.      .2602gf after the jobname.  Examples of  proof  mode  output
  81.      can  be  found  in  ComputerModernTypefaces,  (Volume  E  of
  82.      ComputersandTypesetting), by Donald Knuth.   The  system  of
  83.      magsteps  is  identical  to  the  system  used by TeX , with
  84.      values generally in the range 0.5, 1.0, 2.0,  3.0,  4.0  and
  85.      5.0.   A listing of gf numbers for 118-dpi, 240-dpi and 300-
  86.      dpi fonts is shown below.
  87.                 MAGSTEP        118 dpi   240 dpi   300 dpi
  88.             mag=magstep(0)       118       240       300
  89.             mag=magstep(0.5)     129       263       329
  90.             mag=magstep(1)       142       288       360
  91.             mag=magstep(2)       170       346       432
  92.             mag=magstep(3)       204       415       518
  93.             mag=magstep(4)       245       498       622
  94.             mag=magstep(5)       294       597       746
  95.  
  96.      Magnification can also be specified not as a magstep but  as
  97.      an arbitrary value, such as 1.315, to create special charac-
  98.      ter sizes.
  99.  
  100.      Before font production can begin, it is necessary to set  up
  101.      the  appropriate  base files.  The minimum set of components
  102.      for font production for a given print-engine is the plain.mf
  103.      macro  file  and  the  local `mode_def' file.  The macros in
  104.      plain.mf can be studied in an appendix to the  METAFONTbook;
  105.      they  were  developed  by Donald Knuth, and this file should
  106.      never be altered except when it is officially upgraded. Each
  107.      mode_def  specification  helps  adapt  fonts to a particular
  108.      print-engine.  There is a regular discussion of mode_defs in
  109.      the  journal of the TeX Users Group, TUGboat; the local ones
  110.      in use on this computer should be somewhere in the directory
  111.      TeX:mfinputs.   With  only  plain.mf  and the ``modes'' file
  112.      loaded it is possible to create fonts of simple  characters,
  113.      such as those used for the METAFONT logo, and those used for
  114.      the LaTeX  line and circle fonts, but the production of Com-
  115.      puter   Modern  fonts  would  be  facilitated  by  making  a
  116.      cmmf.base file (which includes the macros  in  cmbase.mf  as
  117.      well as those in plain.mf).
  118.  
  119.      Several environment variables can be used to set  up  direc-
  120.      tory  paths  to search when METAFONT opens a file for input.
  121.      For example, the csh command
  122.          setenv MFINPUTS .,/usr/me/mylib,TeX:mfinputs
  123.      or the sh command sequence
  124.          MFINPUTS=.,/usr/me/mylib,TeX:mfinputs
  125.          export MFINPUTS
  126.  
  127.  
  128.  
  129.                       Last change: 9/25/90                      2
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. MF(1)                    USER COMMANDS                      MF(1)
  137.  
  138.  
  139.  
  140.      would cause all invocations of METAFONT and its  derivatives
  141.      to  look  for  \input  files first in the current directory,
  142.      then in a hypothetical user's ``mylib'', and finally in  the
  143.      system  library.   Normally, the user will place the command
  144.      sequence which sets up the MFINPUTS environment variable  in
  145.      his or her .login or .profile file.
  146.  
  147.      The e response to METAFONT's error-recovery mode invokes the
  148.      system  default  editor  at the erroneous line of the source
  149.      file.  There is an environment variable, MFEDIT, that  over-
  150.      rides  the  default  editor. It should contain a string with
  151.      "%s" indicating where the filename goes and "%d"  indicating
  152.      where the decimal linenumber (if any) goes.  For example, an
  153.      MFEDIT string for the vi editor can be set with the csh com-
  154.      mand
  155.              setenv MFEDIT "/usr/ucb/vi +%d %s"
  156.      The environment variables section below lists  the  relevant
  157.      environment variables, and their defaults.
  158.  
  159.      A convenient file in  the  library  is  null.mf,  containing
  160.      nothing.   When mf can't find the file it thinks you want to
  161.      input, it keeps asking you for another file name;   respond-
  162.      ing  `null'  gets  you  out of the loop if you don't want to
  163.      input anything.
  164.  
  165. ENVIRONMENT VARIABLES
  166.      The default values for all environment variables are set  at
  167.      the  time  of  compilation in a file site.h.  See tex(1) for
  168.      the details of the searching.  If the  environment  variable
  169.      TEXMFOUTPUT  is  set,  METAFONT  attempts  to put its output
  170.      files in it, if they cannot be put in the current directory.
  171.      Again, see tex(1).
  172.  
  173.      MFINPUTS
  174.           Search path for input and openin files.  It  should  be
  175.           colon-separated, and start with ``.''.  Default: .
  176.  
  177.      MFINPUTS_SUBDIR
  178.           Search path  for  directories  with  subdirectories  of
  179.           input files.  Default: TeX:MFinputs
  180.  
  181.      MFBASES
  182.           Search path for base files.  Default: TeX:bases.
  183.  
  184.      MFPOOL
  185.           Search path for METAFONT  internal  strings.   Default:
  186.           TeX:pool.
  187.  
  188.      MFEDIT
  189.           Command template for  switching  to  editor.   Default:
  190.           run lse %s.
  191.  
  192.  
  193.  
  194.                       Last change: 9/25/90                      3
  195.  
  196.  
  197.  
  198.  
  199.  
  200.  
  201. MF(1)                    USER COMMANDS                      MF(1)
  202.  
  203.  
  204.  
  205. FONT UTILITIES
  206.      A number of utility programs are available. The following is
  207.      a  partial  list  of  available utilities and their purpose.
  208.      Consult your local METAFONT guru for details.
  209.  
  210.      gftopk    Takes a GF file and produces a more tightly packed
  211.                PK font file.
  212.  
  213.      gftodvi   Produces proof sheets for fonts.
  214.  
  215.      gftype    Displays the contents of a GF  file  in  mnemonics
  216.                and/or images.
  217.  
  218.      pktype    Mnemonically displays the contents of a PK file.
  219.  
  220.      mft       Formats a source file as shown in Computer  Modern
  221.                Typefaces.
  222.  
  223. FILES
  224.      TeX:                METAFONT's library areas
  225.  
  226.      TeX:pool/mf.pool    Encoded text of METAFONT's messages
  227.  
  228.      TeX:bases/*.base    METAFONT base files
  229.  
  230.      TeX:mfinputs/standard/plain.mf
  231.                          The ``standard'' macro package
  232.  
  233.      TeX:mfinputs/local/(something).mf
  234.                          The  file  of  ``mode_def''s  for   your
  235.                          site's various printers
  236.  
  237.      TeX:mfinputs/cm/mf  METAFONT sources for Computer Modern
  238.  
  239. SUGGESTED READING
  240.      Donald E. Knuth, The METAFONTbook (Volume  C  of   Computers
  241.      and Typesetting)
  242.      Donald E. Knuth, METAFONT: The Program (Volume D of  Comput-
  243.      ers and Typesetting)
  244.      Donald E. Knuth, Computer  Modern  Typefaces  (Volume  E  of
  245.      Computers and Typesetting)
  246.      TUGboat (the publication of the TeX  Users Group)
  247.  
  248. COMMENTS
  249.      Warning: ``Type  design  can  be  hazardous  to  your  other
  250.      interests.  Once  you  get  hooked, you will develop intense
  251.      feelings about letterforms; the medium will intrude  on  the
  252.      messages  that you read.  And you will perpetually be think-
  253.      ing of improvements to the fonts that  you  see  everywhere,
  254.      especially those of your own design.''
  255.  
  256.  
  257.  
  258.  
  259.  
  260.                       Last change: 9/25/90                      4
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267. MF(1)                    USER COMMANDS                      MF(1)
  268.  
  269.  
  270.  
  271. SEE ALSO
  272.      gftopk(1),   gftodvi(1),   gftype(1),   mft(1),   pltotf(1),
  273.      tftopl(1)
  274.  
  275. BUGS
  276.      On January  4,  1986  the  ``final''  bug  in  METAFONT  was
  277.      discovered and removed. If an error still lurks in the code,
  278.      D.E. Knuth promises to pay a finders fee which doubles every
  279.      year to the first person who finds it. Happy hunting.
  280.  
  281. AUTHORS
  282.      METAFONT was designed by Donald E. Knuth, who implemented it
  283.      using his WEB system for Pascal programs.  It was originally
  284.      ported to Unix by Paul Richards at the University  of  Illi-
  285.      nois  at  Urbana-Champaign.   This  page  written  by Pierre
  286.      MacKay (mostly).
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.                       Last change: 9/25/90                      5
  327.  
  328.  
  329.  
  330.