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
Wrap
Text File
|
1990-09-24
|
13KB
|
338 lines
==============================================================================
MFjob 1.1f VERSION: 25.09.1990
==============================================================================
A program to automate the generation of fonts with METAFONT, GFtoPXL and
GFtoPK. The fonts to be generated, their magnifications and the device
for which they are intended are supplied in an input file (mfj file).
Usage
=====
mfjob <mfj_file> [<options>] [<macro>=<definition>]
mfjob /s [<options>]
mfj_file:
Name of the mfj file (default extension: mfj).
options:
/2 Call the version of METAFONT for the 80286-processor (mf286.exe or
bmf286.exe instead of mf.exe or bmf.exe). This option cannot be used
under OS/2. See also /b.
/a Create all fonts. (Default: create only those which do not exist.)
/b Call bigMETAFONT instead of the default version (bmf.exe, bmf286.exe
or bmfp.exe instead of mf.exe, mf286.exe or mfp.exe). See also /2.
/d Do not use expanded memory (DOS). This option is handed down to
METAFONT.
/i Ignore errors produced by METAFONT. When METAFONT recognizes an
error, a non-zero error code is returned. If /i is not used, MFjob
will be aborted as well. When working with low resolutions, however,
errors like `strange path' or `Bad pos' will occur more frequently.
To let MFjob work without supervision, you should use /i. If, when
using /i, METAFONT returns a non-zero error code, the log file written
by METAFONT is appended to the file mfjob.log in the current
directory, and work is continued. If you want to abort MFjob while
METAFONT is running, you should interrupt METAFONT with ^C, end
METAFONT with X and then abort MFjob with ^C. This will be easier
without /i, as METAFONT returns an error code of 2 when interrupted
with ^C and X; this will stop MFjob as well.
/l Low priority (OS/2 only). This option is handed down to METAFONT.
/m Master (for network). [not implemented yet]
/n Don't make fonts, just list commands.
/pv[:][=]<drive>
Set drive for default directories. This option is also handed down
to METAFONT.
/s Slave (for network). [not implemented yet]
<macro>=<definition>:
Define a macro. See below.
mfj file format
===============
The file can contain comments which start with `%', this character and all
other characters to the end of the line being ignored.
However, a `%' within brackets `[' `]' does not start a comment.
Here is a small mfj file as an example:
-------------------------------------------------------------------------------
%
% minimal.mfj
%
{
font=cmr10;
mag=1;
mode=hplaser[300];
output=pk[c:\emtex\pixel.lj\$rdpi];
}
-------------------------------------------------------------------------------
This file contains a BLOCK, which starts with an open brace and ends with the
matching closing brace. DECLARATIONs (other than macro definitions) can only
appear within a block. Blocks can be nested.
A definition within a block has no effect outside this block but is inherited
by blocks nested within it. Now for declarations:
font=
fonts=
This lists the names of the fonts which are to be computed. Each
name must be separated from the next by a blank or the end of the
line. A semicolon terminates the list. The font declaration adds the
fonts listed to the set of fonts to be generated. The font names can
include the following special characters:
? matches any character
* matches the rest of the name
# matches one or more digits
mag=
mags=
This declaration list the magnifications for which the fonts are to be
generated. The numbers must lie in the range 0.1 to 1000 and may
contain a decimal point. The usual magsteps can be abbreviated to s0
(1.0), s1 (1.2), s2 (1.44) and so on to s9 (5.159780352). The
abbreviation for magstep 0.5 is sh (1.095445115). Each magnification
must be separated from the next by a space, the list ends with a
semicolon. This declaration adds the list of magnifications to those
already declared.
mode=
This declares the device for which the fonts are to be generated. The
mode name (as defined in local.mf) is followed by the horizontal
resolution (in DPI) in brackets. The declaration ends with a
semicolon. Each block can only contain one mode declaration.
However, blocks can be nested: see below.
output=
This selects the output files to be generated and the directory in
which they are to be stored. The following output file types can be
generated:
pxl pxl file (created by GFtoPXL).
pk pk file (created by GFtoPK).
gf gf file (created by METAFONT).
log log file (created by METAFONT).
tfm tfm file (created by METAFONT).
The directory, in brackets, follows the file type. The following
special sequences can be used in the directory name:
%r or $r the resolution of the device in DPI
%s or $s the PXL font size (5*resolution)
Each file type/directory combination is separated from the next by a
space and the list ends with a semicolon.
Only the file types listed in this declaration will be generated, or
rather, all tfm, gf and log files not given in an output declaration
will be deleted. The output declaration replaces previous entries
for the separate file types.
base=
This selects the METAFONT base to be used for the generation
of the fonts which FOLLOW it. The usual declarations are base=cm or
base=plain; at the beginning of the outermost block base=cm has been
set. The base declaration replaces the preceding one. The
declaration is followed by a semicolon.
At the end of every block which does not contain a nested block the selected
fonts with the selected bases in the selected magnifications for the selected
device are set to generate the selected file types. The generation of these
fonts start after the mfj file has been read. If the /a option is not used,
only those of the selected fonts which do not already exist will be generated
-- if only the log file is missing, however, the font will not be generated.
The following example generates cmr10 and cmbx10 as pk files in magnifications
1 and 1.2 for the HP LaserJet+ and the Epson FX-80.
-------------------------------------------------------------------------------
%
% example.mfj
%
{
fonts=cmr10 cmbx10;
mags=s0 s1;
{
mode=hplaser[300];
output=pk[c:\emtex\pixel.lj\pxl$s];
}
{
mode=epsonfx[240];
output=pk[c:\emtex\pixel.fx\pxl$s];
}
}
-------------------------------------------------------------------------------
Included data files
===================
Files containing mfj declarations can be included with the command
input [name];
Macros
======
Macros can be defined either in the command line (see above) or in the mfj
file with the commands
def macro=[definition];
redef macro=[definition];
If a macro is defined more than once then only the first definition (for
instance, in the command line) will be used. Macros can be redefined with
`redef' in which case the old definition will be replaced when it is no longer
used. Example:
def x=[mag=2;redef x=[mag=4;];mag=3;x;mag=5];
x;
This expands to: mag=2;mag=3;mag=4;mag=5
Macros are only expanded outside brackets (`[...]'). As macros containing
blanks cannot be defined in the command line, any commas in a command line
macro definition will be replaced by spaces.
Example:
-------------------------------------------------------------------------------
%
% x.mfj
%
input [modes];
def s=[1];
def f=[cmr10];
{
fonts=f; mags=s; m;
}
-------------------------------------------------------------------------------
-------------------------------------------------------------------------------
%
% modes.mfj
%
def lj=[mode=hplaser[300]; output=pk[c:\newfonts\pixel.lj\%rdpi]; tfmlog];
def fx=[mode=epsonfx[240]; output=pk[c:\newfonts\pixel.fx\%rdpi]; tfmlog];
def mx=[mode=epsonmx[120]; output=pk[c:\newfonts\pixel.mx\%rdpi]; tfmlog];
def lql=[mode=lqlores[180]; output=pk[c:\newfonts\pixel.p6l\%rdpi]; tfmlog];
def lqm=[mode=lqmedres[360]; output=pk[c:\newfonts\pixel.p6m\%rdpi]; tfmlog];
def lqh=[mode=lqhires[360]; output=pk[c:\newfonts\pixel.p6h\%rdpi]; tfmlog];
def ito=[mode=itoh[160]; output=pk[c:\newfonts\pixel.ito\%rdpi]; tfmlog];
def kyo=[mode=kyocera[300]; output=pk[c:\newfonts\pixel.lj\%rdpi]; tfmlog];
def FAX=[mode=fax[204]; output=pk[c:\newfonts\pixel.fax\%rdpi]; tfmlog];
def qj=[mode=hpquiet[192]; output=pk[c:\newfonts\pixel.qj\%rdpi]; tfmlog];
def m=[lj];
def tfmlog=[output=tfm[c:\newfonts\tfm] log[c:\newfonts\log];];
-------------------------------------------------------------------------------
Call:
mfjob x s=s0,s1 f=cmbx10,cmti10 m=fx
Note: `fax' isn't the same as 'FAX'.
Notes
=====
The /m and /s options (for networks) are not yet implemented. They will have
the following effect: the MFjob is started on one (and only one) workstation
on the network with the /m option, on all the other machines it is started
with the /s option. By this means the job can be shared between all the
workstations on the network. The MFjob programs started with /s do not read
the main mfj file but only the temporary file created by the MFjob started
with /m.
The font files are first sought in the current directory and, if not
found, the search is extended to the directories listed in the environment
variable MFINPUT. If MFINPUT is not set then the default directory
\emtex\mfinput (on the drive set by /pv or EMTEXDRV) is searched. Use
set emtexdrv=e
or
mfjob /pv:e ...
to make MFjob search e:\emtex\mfinput (for font files) and e:\emtex\mfjob
(for mfj files). If you don't use EMTEXDRV and /pv, the dircetories
\emtex\mfinput and \emtex\mfjob on the current drive will be searched.
MFjob consists of three programs: mfjob.exe, mfjob1.ovl, mfjob2.ovl.
Besides METAFONT, gftopk.exe and gftopxl.exe are needed. For METAFONT,
the following file is used:
MFjob call | DOS | OS/2
------------------+------------+-------------
MFjob | mf.exe | mfp.exe
MFjob /2 | mf286.exe | --
MFjob /b | bmf.exe | bmfp.exe
MFjob /2 /b | bmf286.exe | --
METAFONT writes its output into the current directory and MFjob needs a
temporary file in this directory. It is therefore recommended that MFjob is
started in a suitable working directory. MFjob programs running concurrently
(network or OS/2) must run in different directories.
The mfj files are sought first in the directory given (if it exists), then in
the current directory, then in the directories listed in the MFJOB
environment variable (the directories in the list must be separated from one
another with a semicolon), and finally in \emtex\mfjob (on the drive
set by EMTEXDRV or /pv).
History
=======
Version 1.1a:
-------------
- Error in `input' corrected.
- Environment variable `MFJOB'.
Version 1.1b:
-------------
- The directory \emtex\mfinput is no longer searched if the
environment variable `MFINPUT' is set.
Version 1.1c (21.02.90):
------------------------
- The `_' character can be used (for instance in mode=).
Version 1.1d (30.04.90):
------------------------
- New option /i to ignore METAFONT error codes.
- New option /2 results in using METAFONT's 286 version.
- New option /b results in using bigMETAFONT.
- New option /d is handed down to METAFONT.
- mfjob1.exe and mfjob2.exe renamed to mfjob1.ovl and mfjob2.ovl.
Version 1.1e (16.07.90):
------------------------
- Default directory for mfj files: \emtex\mfjob.
- New option: /pv (set drive for default directories).
- New environment variable: EMTEXDRV (drive for default directories).
Version 1.1f (25.09.90):
------------------------
- Display '======...' after generating of a font.