-This is a font of music symbols. All MF sources are original. The
-symbols are modelled after various editions of music, notably
+This is a font of music symbols. All MF sources are original. Most
+of the documentation is in comments in the MF code.
- - Baerenreiter
- - Hofmeister
- - Breitkopf
- - Durand & C'ie
+Currently, outline fonts are created by using `autotrace', but we are
+already in the process to convert the MF code directly to PostScript code
+with a tool called `mf2pt1', which in turn calls `FontForge' to postprocess
+the output (mainly to remove outline overlaps and to add hints).
-The best references on Music engraving are [Wanske] and [Ross], some
-of their insights have also been used. Although a matter of taste,
-I'd say that Baerenreiter has the finest typography of all.
+The recommended calling sequence of mf2pt1 is
-Traditional engraving uses a set of 9 standardised sizes for Staffs
-(running from 0 to 8).
+ mf2pt1 --rounding=0.001 <font>
-I tried measuring those (helped by a magnifying glass), and I get the
-staffsizes in the following table. One should note that these are
-estimates, so I think there could be a measuring error of ~ .5 pt.
-Moreover [Ross] states that not all engravers use exactly those sizes.
+You need mf2pt1 version 2.1 or newer.
-Staffsize Numbers Name
+Here some guidelines to assure a clean conversion.
-26.2pt No. 0
-22.6pt No. 1 Giant/English
-21.3pt No. 2 Giant/English
-19.9pt No. 3 Regular, Ordinary, Common
-19.1pt No. 4 Peter
-17.1pt No. 5 Large middle
-15.9pt No. 6 Small middle
-13.7pt No. 7 Cadenza
-11.1pt No. 8 Pearl
+. Never use `---'. Replace it with `--' together with explicit path
+ directions (if necessary).
+. Don't use self-intersecting outlines in general since it can confuse
+ mf2pt1's algorithm to get the orientation of a closed path. Note that
+ MetaPost's implementation of the `turningnumber' primitive (which would
+ immediately give the orientation of a path) is severely broken and not
+ fixed yet at the time of writing (November 2005), thus some hand-made code
+ in mf2pt1.mp is used to work around this bug.
-This table is partially taken from [Ross]. Most music is set in No.3,
-but the papersizes usually are bigger than standard printer paper
-(such as A4). If you plot these, you'll notice that the sizes (With
-exception of 26) almost (but not quite) form a arithmetic progression.
+. If outlines intersect, avoid grazing intersections. In case two outlines
+ intersect in an explicitly defined point, include this point into both
+ intersecting paths to avoid problems due to rounding errors.
-[Ross] states that the dies (the stamps to make the symbols) come in
-12 different sizes.
+. Don't use `draw' with a polygonal pen but for straight lines (consisting
+ of exactly two points). In most cases it is quite easy to emulate `draw'
+ with an explicit definition of the outline or with `penstroke'.
+. Don't apply transformations after calling `fill' -- for example, don't
+ mirror `currentpicture'. Instead, transform the path and call `fill'
+ afterwards. This insures that mf2pt1 gets the correct outline directions
+ which is a necessary prerequisite for FontForge's algorithm to remove
+ overlaps.
+
+Some design rules:
+
+. Always use smooth curve transitions. Since this is difficult to see in
+ MetaFont proof sheets (which don't show the tangents) I recommend to call
+ mf2pt1 like this
+
+ FONTFORGE=foo mf2pt1 ...
+
+ (`foo' should be a non-existent program; this avoids the default
+ postprocessing). Then call FontForge to inspect the outlines.
+
+. Use rounded corners.
+
+
+Finally, some rules to assure that rasterization at low resolutions give
+good results. Today, this is a minor issue, but in some cases it might show
+design flaws.
+
+. Use `define_whole_pixels' and friends where appropriate.
+
+. Use `hround' and `vround' consistently. A lot of auxiliary macros are
+ defined in feta-macros.mf.
+
+. If a path element is duplicated or shifted, use an integer value for the
+ offset.
+
+. Add `eps' for mirrored paths to assure correct MetaFont rasterization.
+ See the comment and the variables at the end of `feta-params.mf' for
+ details how vertical symmetry should be achieved.