home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / TEXDISK / MFWARE2.ZIP / EMTEX / DOC / ENGLISH / MFJOB.DOC
Text File  |  1990-09-24  |  13KB  |  338 lines

  1. ==============================================================================
  2. MFjob 1.1f                                                 VERSION: 25.09.1990
  3. ==============================================================================
  4.  
  5. A program to automate the generation of fonts with METAFONT, GFtoPXL and
  6. GFtoPK.  The fonts to be generated, their magnifications and the device
  7. for which they are intended are supplied in an input file (mfj file).
  8.  
  9.  
  10. Usage
  11. =====
  12.  
  13. mfjob <mfj_file> [<options>] [<macro>=<definition>]
  14. mfjob /s [<options>]
  15.  
  16. mfj_file:
  17.         Name of the mfj file (default extension: mfj).
  18.  
  19. options:
  20.  
  21. /2      Call the version of METAFONT for the 80286-processor (mf286.exe or
  22.         bmf286.exe instead of mf.exe or bmf.exe).  This option cannot be used 
  23.         under OS/2.  See also /b.
  24.  
  25. /a      Create all fonts.  (Default: create only those which do not exist.)
  26.  
  27. /b      Call bigMETAFONT instead of the default version (bmf.exe, bmf286.exe
  28.         or bmfp.exe instead of mf.exe, mf286.exe or mfp.exe).  See also /2.
  29.  
  30. /d      Do not use expanded memory (DOS).  This option is handed down to
  31.         METAFONT.
  32.  
  33. /i      Ignore errors produced by METAFONT.  When METAFONT recognizes an
  34.         error, a non-zero error code is returned.  If /i is not used, MFjob
  35.         will be aborted as well.  When working with low resolutions, however,
  36.         errors like `strange path' or `Bad pos' will occur more frequently.
  37.         To let MFjob work without supervision, you should use /i.  If, when
  38.         using /i, METAFONT returns a non-zero error code, the log file written
  39.         by METAFONT is appended to the file mfjob.log in the current
  40.         directory, and work is continued. If you want to abort MFjob while
  41.         METAFONT is running, you should interrupt METAFONT with ^C, end
  42.         METAFONT with X and then abort MFjob with ^C.  This will be easier
  43.         without /i, as METAFONT returns an error code of 2 when interrupted
  44.         with ^C and X; this will stop MFjob as well.
  45.  
  46. /l      Low priority (OS/2 only).  This option is handed down to METAFONT.
  47.  
  48. /m      Master (for network).                            [not implemented yet]
  49.  
  50. /n      Don't make fonts, just list commands.
  51.  
  52. /pv[:][=]<drive>
  53.         Set drive for default directories.  This option is also handed down
  54.         to METAFONT.
  55.  
  56. /s      Slave (for network).                             [not implemented yet]
  57.  
  58. <macro>=<definition>:
  59.         Define a macro.  See below.
  60.  
  61.  
  62. mfj file format
  63. ===============
  64.  
  65. The file can contain comments which start with `%', this character and all
  66. other characters to the end of the line being ignored.
  67. However, a `%' within brackets `[' `]' does not start a comment.
  68.  
  69. Here is a small mfj file as an example:
  70.  
  71. -------------------------------------------------------------------------------
  72. %
  73. % minimal.mfj
  74. %
  75. {
  76. font=cmr10;
  77. mag=1;
  78. mode=hplaser[300];
  79. output=pk[c:\emtex\pixel.lj\$rdpi];
  80. }
  81. -------------------------------------------------------------------------------
  82.  
  83. This file contains a BLOCK, which starts with an open brace and ends with the
  84. matching closing brace.  DECLARATIONs (other than macro definitions) can only
  85. appear within a block.  Blocks can be nested.
  86.  
  87. A definition within a block has no effect outside this block but is inherited
  88. by blocks nested within it. Now for declarations:
  89.  
  90.     font=
  91.     fonts=
  92.         This lists the names of the fonts which are to be computed.  Each
  93.         name must be separated from the next by a blank or the end of the
  94.         line.  A semicolon terminates the list.  The font declaration adds the
  95.         fonts listed to the set of fonts to be generated.  The font names can
  96.         include the following special characters:
  97.             ?       matches any character
  98.             *       matches the rest of the name
  99.             #       matches one or more digits
  100.  
  101.     mag=
  102.     mags=
  103.         This declaration list the magnifications for which the fonts are to be
  104.         generated.  The numbers must lie in the range 0.1 to 1000 and may
  105.         contain a decimal point.  The usual magsteps can be abbreviated to s0
  106.         (1.0), s1 (1.2), s2 (1.44) and so on to s9 (5.159780352).  The
  107.         abbreviation for magstep 0.5 is sh (1.095445115).  Each magnification
  108.         must be separated from the next by a space, the list ends with a
  109.         semicolon.  This declaration adds the list of magnifications to those
  110.         already declared.
  111.  
  112.     mode=
  113.         This declares the device for which the fonts are to be generated.  The
  114.         mode name (as defined in local.mf) is followed by the horizontal
  115.         resolution (in DPI) in brackets. The declaration ends with a
  116.         semicolon.  Each block can only contain one mode declaration.
  117.         However, blocks can be nested: see below.
  118.  
  119.     output=
  120.         This selects the output files to be generated and the directory in
  121.         which they are to be stored.  The following output file types can be
  122.         generated:
  123.             pxl             pxl file (created by GFtoPXL).
  124.             pk              pk file  (created by GFtoPK).
  125.             gf              gf file  (created by METAFONT).
  126.             log             log file (created by METAFONT).
  127.             tfm             tfm file (created by METAFONT).
  128.         The directory, in brackets, follows the file type.  The following
  129.         special sequences can be used in the directory name:
  130.             %r or $r        the resolution of the device in DPI
  131.             %s or $s        the PXL font size (5*resolution)
  132.         Each file type/directory combination is separated from the next by a
  133.         space and the list ends with a semicolon.
  134.         Only the file types listed in this declaration will be generated, or
  135.         rather, all tfm, gf and log files not given in an output declaration
  136.         will be deleted.  The output declaration replaces previous entries
  137.         for the separate file types.
  138.  
  139.     base=
  140.         This selects the METAFONT base to be used for the generation
  141.         of the fonts which FOLLOW it.  The usual declarations are base=cm or
  142.         base=plain; at the beginning of the outermost block base=cm has been
  143.         set.  The base declaration replaces the preceding one.  The
  144.         declaration is followed by a semicolon.
  145.  
  146. At the end of every block which does not contain a nested block the selected
  147. fonts with the selected bases in the selected magnifications for the selected
  148. device are set to generate the selected file types.  The generation of these
  149. fonts start after the mfj file has been read. If the /a option is not used,
  150. only those of the selected fonts which do not already exist will be generated
  151. -- if only the log file is missing, however, the font will not be generated.
  152.  
  153. The following example generates cmr10 and cmbx10 as pk files in magnifications
  154. 1 and 1.2 for the HP LaserJet+ and the Epson FX-80.
  155.  
  156. -------------------------------------------------------------------------------
  157. %
  158. % example.mfj
  159. %
  160. {
  161. fonts=cmr10 cmbx10;
  162. mags=s0 s1;
  163.     {
  164.     mode=hplaser[300];
  165.     output=pk[c:\emtex\pixel.lj\pxl$s];
  166.     }
  167.     {
  168.     mode=epsonfx[240];
  169.     output=pk[c:\emtex\pixel.fx\pxl$s];
  170.     }
  171. }
  172. -------------------------------------------------------------------------------
  173.  
  174.  
  175. Included data files
  176. ===================
  177.  
  178. Files containing mfj declarations can be included with the command
  179.     input [name];
  180.  
  181.  
  182. Macros
  183. ======
  184.  
  185. Macros can be defined either in the command line (see above) or in the mfj
  186. file with the commands
  187.     def macro=[definition];
  188.     redef macro=[definition];
  189.  
  190. If a macro is defined more than once then only the first definition (for
  191. instance, in the command line) will be used.  Macros can be redefined with
  192. `redef' in which case the old definition will be replaced when it is no longer
  193. used. Example:
  194.     def x=[mag=2;redef x=[mag=4;];mag=3;x;mag=5];
  195.     x;
  196. This expands to: mag=2;mag=3;mag=4;mag=5
  197.  
  198. Macros are only expanded outside brackets (`[...]').  As macros containing
  199. blanks cannot be defined in the command line, any commas in a command line
  200. macro definition will be replaced by spaces.
  201.  
  202. Example:
  203.  
  204. -------------------------------------------------------------------------------
  205. %
  206. % x.mfj
  207. %
  208. input [modes];
  209. def s=[1];
  210. def f=[cmr10];
  211.     {
  212.     fonts=f; mags=s; m;
  213.     }
  214. -------------------------------------------------------------------------------
  215.  
  216. -------------------------------------------------------------------------------
  217. %
  218. % modes.mfj
  219. %
  220. def lj=[mode=hplaser[300]; output=pk[c:\newfonts\pixel.lj\%rdpi]; tfmlog];
  221. def fx=[mode=epsonfx[240]; output=pk[c:\newfonts\pixel.fx\%rdpi]; tfmlog];
  222. def mx=[mode=epsonmx[120]; output=pk[c:\newfonts\pixel.mx\%rdpi]; tfmlog];
  223. def lql=[mode=lqlores[180]; output=pk[c:\newfonts\pixel.p6l\%rdpi]; tfmlog];
  224. def lqm=[mode=lqmedres[360]; output=pk[c:\newfonts\pixel.p6m\%rdpi]; tfmlog];
  225. def lqh=[mode=lqhires[360]; output=pk[c:\newfonts\pixel.p6h\%rdpi]; tfmlog];
  226. def ito=[mode=itoh[160]; output=pk[c:\newfonts\pixel.ito\%rdpi]; tfmlog];
  227. def kyo=[mode=kyocera[300]; output=pk[c:\newfonts\pixel.lj\%rdpi]; tfmlog];
  228. def FAX=[mode=fax[204]; output=pk[c:\newfonts\pixel.fax\%rdpi]; tfmlog];
  229. def qj=[mode=hpquiet[192]; output=pk[c:\newfonts\pixel.qj\%rdpi]; tfmlog];
  230. def m=[lj];
  231. def tfmlog=[output=tfm[c:\newfonts\tfm] log[c:\newfonts\log];];
  232. -------------------------------------------------------------------------------
  233.  
  234. Call:
  235.     mfjob x s=s0,s1 f=cmbx10,cmti10 m=fx
  236.  
  237.  
  238. Note: `fax' isn't the same as 'FAX'.
  239.  
  240.  
  241. Notes
  242. =====
  243.  
  244. The /m and /s options (for networks) are not yet implemented.  They will have
  245. the following effect: the MFjob is started on one (and only one) workstation
  246. on the network with the /m option, on all the other machines it is started
  247. with the /s option.  By this means the job can be shared between all the
  248. workstations on the network. The MFjob programs started with /s do not read
  249. the main mfj file but only the temporary file created by the MFjob started
  250. with /m.
  251.  
  252. The font files are first sought in the current directory and, if not
  253. found, the search is extended to the directories listed in the environment
  254. variable MFINPUT.  If MFINPUT is not set then the default directory
  255. \emtex\mfinput (on the drive set by /pv or EMTEXDRV) is searched. Use
  256.     set emtexdrv=e
  257. or
  258.     mfjob /pv:e ...
  259. to make MFjob search e:\emtex\mfinput (for font files) and e:\emtex\mfjob
  260. (for mfj files). If you don't use EMTEXDRV and /pv, the dircetories
  261. \emtex\mfinput and \emtex\mfjob on the current drive will be searched.
  262.  
  263. MFjob consists of three programs: mfjob.exe, mfjob1.ovl, mfjob2.ovl.
  264. Besides METAFONT, gftopk.exe and gftopxl.exe are needed.  For METAFONT, 
  265. the following file is used:
  266.  
  267.     MFjob call        | DOS        | OS/2
  268.     ------------------+------------+-------------
  269.     MFjob             | mf.exe     | mfp.exe
  270.     MFjob /2          | mf286.exe  | --
  271.     MFjob /b          | bmf.exe    | bmfp.exe
  272.     MFjob /2 /b       | bmf286.exe | --
  273.  
  274. METAFONT writes its output into the current directory and MFjob needs a
  275. temporary file in this directory.  It is therefore recommended that MFjob is
  276. started in a suitable working directory.  MFjob programs running concurrently
  277. (network or OS/2) must run in different directories.
  278.  
  279. The mfj files are sought first in the directory given (if it exists), then in
  280. the current directory, then in the directories listed in the MFJOB
  281. environment variable (the directories in the list must be separated from one
  282. another with a semicolon), and finally in \emtex\mfjob (on the drive
  283. set by EMTEXDRV or /pv).
  284.  
  285.  
  286. History
  287. =======
  288.  
  289. Version 1.1a:
  290. -------------
  291.  
  292. -   Error in `input' corrected.
  293.  
  294. -   Environment variable `MFJOB'.
  295.  
  296.  
  297. Version 1.1b:
  298. -------------
  299.  
  300. -   The directory \emtex\mfinput is no longer searched if the
  301.     environment variable `MFINPUT' is set.
  302.  
  303.  
  304. Version 1.1c (21.02.90):
  305. ------------------------
  306.  
  307. -   The `_' character can be used (for instance in mode=).
  308.  
  309.  
  310. Version 1.1d (30.04.90):
  311. ------------------------
  312.  
  313. -   New option /i to ignore METAFONT error codes.
  314.  
  315. -   New option /2 results in using METAFONT's 286 version.
  316.  
  317. -   New option /b results in using bigMETAFONT.
  318.  
  319. -   New option /d is handed down to METAFONT.
  320.  
  321. -   mfjob1.exe and mfjob2.exe renamed to mfjob1.ovl and mfjob2.ovl.
  322.  
  323.  
  324. Version 1.1e (16.07.90):
  325. ------------------------
  326.  
  327. -   Default directory for mfj files: \emtex\mfjob.
  328.  
  329. -   New option: /pv (set drive for default directories).
  330.  
  331. -   New environment variable: EMTEXDRV (drive for default directories).
  332.  
  333.  
  334. Version 1.1f (25.09.90):
  335. ------------------------
  336.  
  337. -   Display '======...' after generating of a font.
  338.