mf2pt1: Additional command-line options
2.3 Additional command-line options
===================================
In addition to the command-line options for setting font parameters that
were presented in Parameters, 'mf2pt1' supports a '--rounding'
option. While 'mf2pt1' normally rounds all font coordinates to the
nearest integer, '--rounding' increases coordinate precision by
instructing 'mf2pt1' to round instead to the nearest multiple of a given
fractional number. For example, '--rounding=0.25' rounds the coordinate
(7.4, 10.3) to (7.5, 10.25) while it would otherwise be rounded to the
less-precise (7, 10).
Large glyphs can be problematic in MetaPost and therefore in
'mf2pt1'. Unlike Metafont, MetaPost does not honor 'mag' for magnifying
dimensions. Rather, the number of PostScript (a.k.a. "big") points per
pixel--'bpppix'--is hardwired to 0.02 and all other dimensions ('mm',
'in', 'pt', etc.) are expressed in terms of that. Consequently, glyphs
that multiply a large number of font units by a dimension are likely to
exceed 4096, the largest value that MetaPost can represent in its
fixed-point format. If numerical overflow becomes a problem you can use
the '--bpppix' option to 'mf2pt1' to change the value of 'bpppix'. For
example, specifying '--bpppix=0.2' enables a tenfold increase in maximum
glyph size (with a corresponding decrease in precision).
After generating a Type 1 font, 'mf2pt1' runs it through FontForge to
add hinting information, remove overlaps, and otherwise clean up the
generated font. The '--ffscript' option specifies the filename of a
FontForge script to use instead of the default script, which is listed
below:
Open($1);
SelectAll();
RemoveOverlap();
AddExtrema();
Simplify(0, 2);
CorrectDirection();
Simplify(0, 2);
RoundToInt();
AutoHint();
Generate($1);
Quit(0);
See the FontForge documentation for an explanation of each of those
commands and a description of other commands made available to FontForge
scripts. 'mf2pt1' runs the script with one argument ('$1'), which is
the name of the generated '.pfb' file.
'mf2pt1' also supports a '--help' option which summarizes all of the
program's command-line options.