mf2pt1: Restrictions
2.1 Restrictions
================
If 'mf2pt1' sounds too good to be true, it is--somewhat. 'mf2pt1' is
not a general-purpose Metafont-to-Type 1 converter. Rather, it can
convert only certain Metafont constructs. This is not a showstopper for
new fonts designed with 'mf2pt1' in mind, but it is unlikely that
'mf2pt1' will work on an arbitrary Metafont source file.
'mf2pt1''s biggest restriction is that each glyph must be drawn
entirely from closed paths, using Metafont's *fill* and *unfill*
commands. ('mf2pt1' has limited support for *draw* and *undraw*, but
their use is currently discouraged. *filldraw* and *unfilldraw* issue a
warning message and invoke *draw* and *undraw*, respectively.) The Type 1
format requires that these paths be nonoverlapping. The following are
some of the alternatives for removing path overlaps:
1. Install FontForge. As part of its final step in producing a Type 1
font, 'mf2pt1' instructs FontForge to replace overlapping paths
with nonoverlapping paths.
2. Remove overlaps using Metafont code within the font program itself.
A '.zip' file attachment to a 6 January 2005 article
(http://tug.org/mailman/htdig/metapost/2005-January/000080.html) by
Boguslaw Jackowski on the MetaPost mailing list (subject: "Re: all
intersections between two paths") includes a MetaPost library which
assists with that task. The library provides a *find_outlines*
command which can be used to define a path as the union of two
other paths. A number of MetaPost example programs are also
included in the '.zip' file.
3. Design your fonts from the beginning without using overlapping
paths.
A secondary restriction is that 'mf2pt1' redefines a number of Plain
Metafont commands, such as *beginchar*, *fill*, and *unfill*. Metafont
font programs which redefine or bypass these (using Metafont primitives)
will not be convertible with 'mf2pt1'.
A far less severe restriction is due to 'mf2pt1''s utilizing
MetaPost's Metafont interface instead of Metafont itself. The
implication is that commands not defined by MetaPost's 'mfplain.mp'
cannot be handled by 'mf2pt1', either. Very few fonts will have a
problem with this restriction but see the MetaPost manual for more
information.