]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/parmesan-custodes.mf
2003 -> 2004
[lilypond.git] / mf / parmesan-custodes.mf
index eac3509eeee5a798390354de560fa7dbc3381d7f..12b54bf7400a0534b7b70fedd62377731e01570d 100644 (file)
@@ -1,9 +1,9 @@
-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
 % parmesan-custodes.mf -- implement ancient custodes
 % 
 % source file of LilyPond's pretty-but-neat music font
 % 
-% (c)  2000--2003 Juergen Reuter <reuter@ipd.uka.de>
+% (c) 2000--2004 Juergen Reuter <reuter@ipd.uka.de>
 % 
 
 save black_notehead_width;
@@ -11,8 +11,28 @@ numeric black_notehead_width;
 
 fet_begingroup ("custodes")
 
-noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
-define_pixels(noteheight);
+%
+% character aligment:
+%
+%   The custos is assumed to be vertically centered around (0, 0).
+%   The left-most edge of the custos should touch the vertical line
+%   that goes though the point (0, 0).
+%
+% set_char_box() conventions:
+%
+% * breapth: Ignored (as far as I know).  Should be set to 0.
+%
+% * width: Should cover the horizontal range of the custos that is to
+%   be printed in the staff.  If the custos has an appendage that is
+%   supposed to reach beyond the right end of the staff, the width
+%   should be set such that the appendage is outside of the char box.
+%
+% * depth: Should match the bottom edge of the custos.  Affects
+%   vertical collision handling.
+%
+% * height: Should match the top edge of the custos.  Affects vertical
+%   collision handling.
+%
 
 save between_staff_lines, on_staff_line, anywhere;
 between_staff_lines = 0;
@@ -53,7 +73,7 @@ def custos_hufnagel(expr verbose_name, internal_name, ly_name,
 
                define_pixels(ht, wd, pen_size, stem_ht);
                pickup pencircle
-                 xscaled stafflinethickness
+                 xscaled linethickness
                  yscaled pen_size
                  rotated -dalpha#;
 
@@ -70,6 +90,7 @@ def custos_hufnagel(expr verbose_name, internal_name, ly_name,
                (y3 - y2) = (x3 - x2) * tand(90-dalpha#);
                draw z1 -- z2 -- z3;
 
+               % The stem is intentionally outside of the char box.
                if direction > 0:
                        set_char_box(0, wd#, ht#/2, stem_ht#);
                else:
@@ -128,14 +149,14 @@ def custos_medicaea(expr verbose_name, internal_name, ly_name,
 
                define_pixels(ht, wd, stem_ht);
 
-               pickup pencircle xscaled 0.6stafflinethickness yscaled ht;
+               pickup pencircle xscaled 0.6linethickness yscaled ht;
                lft x1 = 0;
                y1 = 0;
                rt x2 = wd;
                y2 = y1;
                draw z1 -- z2;
 
-               pickup pencircle scaled 0.6stafflinethickness;
+               pickup pencircle scaled 0.6linethickness;
                rt x3 = wd;
                y3 = 0;
                x4 = x3;
@@ -207,7 +228,7 @@ def custos_vaticana(expr verbose_name, internal_name, ly_name,
 
                define_pixels(u_offs, l_offs, stem_end, ht, wd, pen_ht);
 
-               pickup pencircle scaled 0.6stafflinethickness;
+               pickup pencircle scaled 0.6linethickness;
                z1 = (0, u_offs);
                z2 = (0.7wd, l_offs);
                z3 = (wd, l_offs);
@@ -282,7 +303,7 @@ def custos_mensural(expr verbose_name, internal_name, ly_name,
 
                define_pixels(ht, wd, stem_ht);
                pickup pencircle
-                 xscaled stafflinethickness
+                 xscaled linethickness
                  yscaled 0.4ht
                  rotated -dalpha#;
 
@@ -300,6 +321,7 @@ def custos_mensural(expr verbose_name, internal_name, ly_name,
 
                draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
 
+               % The stem is intentionally outside of the char box.
                if direction > 0:
                        set_char_box(0, wd#, +direction*0.33ht#, stem_ht#);
                else: