]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/README
Merge with git+ssh://jneem@git.sv.gnu.org/srv/git/lilypond.git
[lilypond.git] / mf / README
index f6878bc0f081d43577a8c0772194d713823ea645..ab3459a73178b463f51aa9cc31462a3150cbbf56 100644 (file)
--- a/mf/README
+++ b/mf/README
@@ -1,44 +1,71 @@
-This is from the package MusixTeX, version T.59 or T.64 (Taupin
-version.)
 
-The documentation states:
+This is a font of music symbols.  All MF sources are original.  Most
+of the documentation is in comments in the MF code.
 
-       \begin{center}
+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).
 
-       Although one of the authors contested that point once the
-       common work had begun, \musixtex{} may be freely copied,
-       duplicated and used. However, since it is intended to be a
-       \ital{freeware} you are not allowed to sell it, and the fee
-       you may ask for distributing it must be limited to
-       maintenance, support and duplication costs. You may take parts
-       of it to include in other packages, but no packages called
-       \musixtex{} may be distributed under this name if different
-       from the original distribution (except obvious bug corrections
-       or text font adaptations for specific implementations).
+The recommended calling sequence of mf2pt1 is
 
-       \musixtex{} may be included in further commercial packages,
-       provided that no fee is charged for \musixtex{} itself.
+  mf2pt1 --rounding=0.001 <font>
 
-       \end{center}
+You need mf2pt1 version 2.1 or newer.
 
+Here some guidelines to assure a clean conversion.
 
-A part (the fonts) are included in this package, which is not called
-\musixtex, so this not a copyright infringement.
+. 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.
 
-MusixTeX is copyright 19?? by:
+. 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.
 
-       Daniel Taupin, 
+. 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'.
 
-       Laboratoire de Physique des Solides (associ\'e au CNRS),
-       b\^atiment 510, Centre Universitaire, F-91405 ORSAY Cedex
-       <taupin@lps.u-psud.fr>
+. 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.
 
-       Ross Mitchell 
 
-       CSIRO Division of Atmospheric Research, Private Bag No.1,
-       Mordialloc, Victoria 3195, Australia
+Some design rules:
 
-       Andreas Egler
+. 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
 
-       (Ruhr--Uni--Bochum) Ursulastr. 32 D-44793 Bochum
+    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.