]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/parmesan-custodes.mf, mf/parmesan-heads.mf,
authorJürgen Reuter <j@web.de>
Wed, 10 Sep 2003 23:35:37 +0000 (23:35 +0000)
committerJürgen Reuter <j@web.de>
Wed, 10 Sep 2003 23:35:37 +0000 (23:35 +0000)
mf/parmesan-clefs.mf: added comments on character alignment and
set_char_box() conventions

* mf/parmesan-custodes.mf, mf/parmesan-clefs.mf: fixed more
set_char_box()'s

* mf/parmesan-clefs.mf: vaticana: adjusted stem width

ChangeLog
mf/parmesan-clefs.mf
mf/parmesan-custodes.mf
mf/parmesan-heads.mf

index dfc3dfdb6beadae7d05cbc423618324f01177473..0cd5da48440e79b9679e96120ed688c9c38a2cac 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2003-09-11  Juergen Reuter  <reuter@ipd.uka.de>
+
+       * mf/parmesan-custodes.mf, mf/parmesan-heads.mf,
+       mf/parmesan-clefs.mf: added comments on character alignment and
+       set_char_box() conventions
+
+       * mf/parmesan-custodes.mf, mf/parmesan-clefs.mf: fixed more
+       set_char_box()'s
+
+       * mf/parmesan-clefs.mf: vaticana: adjusted stem width
+
 2003-09-10  Heikki Junes  <hjunes@cc.hut.fi>
 
        * spec/lilypond.{mandrake,suse}.spec.in: update lilypond.words path.
index c43859d06417f737581be9703689d1e3b3498d48..98f1ebf46379432ca9c9f4aaa58b4717da63c545 100644 (file)
@@ -1,4 +1,4 @@
-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
 % parmesan-clefs.mf -- implement ancient clefs
 % 
 % source file of LilyPond's pretty-but-neat music font
@@ -8,6 +8,38 @@
 
 fet_begingroup ("clefs")
 
+%
+% character aligment:
+%
+%   Each clef is associated with a particular pitch: the treble clef
+%   with the 'g', the alto clef with the 'c', the bass clef with the
+%   'f', etc.  The shape of each clef character defines a vertical
+%   position that is assumed to represent this pitch.  For the treble
+%   clef, it is the vertical position of the center of the spiral
+%   ending that represents the 'g' pitch.  For the bass clef, it is
+%   the center between the two fat dots that define the vertical
+%   position of the 'f' pitch.  For the alto clef, it is the vertical
+%   center of the clef that is aligned with the 'c' pitch.  For each
+%   clef character, this center should be vertically aligned with the
+%   point (0, 0).  The horizontal alignment of each clef character
+%   should be such that the vertical line through the point (0, 0)
+%   touches the left-most edge of the clef.
+%
+%   TODO: document exact_center
+%
+% set_char_box() conventions:
+%
+% * breapth: Ignored (as far as I know).  Should be set to 0.
+%
+% * width: Should match the head's width.
+%
+% * depth: Should match the bottom edge of the head.  Affects vertical
+%   collision handling.
+%
+% * height: Should match the top edge of the head.  Affects vertical
+%   collision handling.
+%
+
 
 %%%%%%%%
 %
@@ -22,22 +54,22 @@ def draw_vaticana_do_clef(expr exact_center, reduction) =
 
        reduced_il# = staff_space# * reduction;
        
-       set_char_box(0.0reduced_il#, 0.4reduced_il#,
+       set_char_box(0.0reduced_il#, 0.5reduced_il#,
                     0.8reduced_il#, 0.8reduced_il#);
 
        define_pixels(reduced_il);
 
-       pickup pencircle xscaled stafflinethickness yscaled 0.6reduced_il;
+       pickup pencircle xscaled 0.6stafflinethickness yscaled 0.6reduced_il;
 
        save za, zb, zc, zd, ze, zf;
        pair za, zb, zc, zd, ze, zf;
 
-       za = exact_center + (0.4reduced_il, -.45reduced_il);
-       zb = exact_center + (0.2reduced_il, -.50reduced_il);
-       zc = exact_center + (0.0reduced_il, -.25reduced_il);
-       zd = exact_center + (0.0reduced_il, +.25reduced_il);
-       ze = exact_center + (0.2reduced_il, +.50reduced_il);
-       zf = exact_center + (0.4reduced_il, +.45reduced_il);
+       rt  za = exact_center + (0.50reduced_il, -.45reduced_il);
+           zb = exact_center + (0.25reduced_il, -.50reduced_il);
+       lft zc = exact_center + (0.00reduced_il, -.25reduced_il);
+       lft zd = exact_center + (0.00reduced_il, +.25reduced_il);
+           ze = exact_center + (0.25reduced_il, +.50reduced_il);
+       rt  zf = exact_center + (0.50reduced_il, +.45reduced_il);
        draw za .. zb .. zc --  % lower punctum
             zd .. ze .. zf;    % upper punctum
 enddef;
@@ -63,30 +95,23 @@ def draw_vaticana_fa_clef(expr exact_center, reduction) =
        save za, zb, zc, zd, ze;
        pair za, zb, zc, zd, ze;
 
-       %stem
-       pickup pencircle scaled stafflinethickness;
-       xpart za = xpart zb =
-               xpart exact_center + 0.4reduced_il;
-       ypart za = ypart exact_center = ypart zb + 1.5reduced_il;
-       draw za .. zb;
-
        %left-handed punctum
-       pickup pencircle xscaled stafflinethickness yscaled 0.5reduced_il;
-       zc = exact_center +
-               (+0.4reduced_il, -0.05reduced_il);
-       zd = exact_center +
-               (+0.2reduced_il, +0.05reduced_il);
-       ze = exact_center +
-               (+0.0reduced_il, +0.00reduced_il);
-       draw zc .. zd .. ze;
+       pickup pencircle xscaled 0.6stafflinethickness yscaled 0.5reduced_il;
+       lft za = exact_center + (+0.00reduced_il, +0.00reduced_il);
+           zb = exact_center + (+0.25reduced_il, +0.05reduced_il);
+       rt  zc = exact_center + (+0.50reduced_il, -0.05reduced_il);
+       draw za .. zb .. zc;
+
+       %stem
+       pickup pencircle scaled 0.6stafflinethickness;
+       xpart zc = xpart zd = xpart ze;
+       ypart zd = ypart exact_center = bot ypart ze + 1.5reduced_il;
+       draw zd -- ze;
 
        %right-handed puncta as in do clef
-       draw_vaticana_do_clef(
-               exact_center +
-               (+0.4reduced_il + 1.25stafflinethickness, 0),
-               reduction);
+       draw_vaticana_do_clef(exact_center + (0.55reduced_il, 0), reduction);
 
-       set_char_box(0.0reduced_il#, 0.8reduced_il# + 1.25stafflinethickness#,
+       set_char_box(0.0reduced_il#, 1.05reduced_il#,
                     1.5reduced_il#, 0.8reduced_il#);
 enddef;
 
@@ -120,42 +145,41 @@ def draw_medicaea_do_clef(expr exact_center, reduction) =
        flag_height# = 0.5 reduced_il#;
        define_pixels(flag_height);
 
-       %lower flag
+       %upper flag
        save za, zb;
        pair za, zb;
        pickup pencircle xscaled reduced_slt yscaled flag_height;
        xpart exact_center
-               = xpart za + 0.5 reduced_il
-               = xpart zb - 0.5 reduced_il;
-       ypart za = ypart exact_center - 0.5 flag_height
-                       - 0.5 (staff_space - reduced_il);
+               = lft xpart za
+               = rt xpart zb - reduced_il;
+       ypart za = ypart exact_center +
+               0.5 (reduced_il - flag_height - staff_space);
        ypart zb = ypart za - reduced_il + flag_height;
-       draw za .. zb;
+       draw za -- zb;
 
-       %upper flag
+       %lower flag
        save za, zb;
        pair za, zb;
        pickup pencircle xscaled reduced_slt yscaled flag_height;
        xpart exact_center
-               = xpart za + 0.5 reduced_il
-               = xpart zb - 0.5 reduced_il;
-       ypart za = ypart exact_center - 0.5 flag_height
-                       - 0.5 (staff_space - reduced_il)
-                       + staff_space;
+               = lft xpart za
+               = rt xpart zb - reduced_il;
+       ypart za = ypart exact_center +
+                0.5 (reduced_il - flag_height + staff_space);
        ypart zb = ypart za - reduced_il + flag_height;
-       draw za .. zb;
+       draw za -- zb;
 
        %stem
        save za, zb;
        pair za, zb;
        pickup pencircle scaled reduced_slt;
-       xpart za = xpart zb = xpart exact_center - 0.5 reduced_il;
+       lft xpart za = lft xpart zb = xpart exact_center;
        ypart exact_center
-               = ypart za + 1.5 reduced_il
-               = ypart zb - 1.5 reduced_il;
-       draw za .. zb;
+               = top ypart zb - 1.5 reduced_il
+               = bot ypart za + 1.5 reduced_il;
+       draw za -- zb;
 
-       set_char_box(0.5reduced_il#, 0.5reduced_il#,
+       set_char_box(0, 1.0reduced_il#,
                     1.5reduced_il#, 1.5reduced_il#);
 enddef;
 
@@ -188,26 +212,19 @@ def draw_medicaea_fa_clef(expr exact_center, reduction) =
        pickup pencircle scaled stafflinethickness;
        xpart za = xpart zb =
                xpart exact_center + 0.4reduced_il;
-       ypart za = ypart exact_center = ypart zb + 1.5reduced_il;
+       ypart za = ypart exact_center = bot ypart zb + 1.5reduced_il;
        draw za -- zb;
 
        %left-handed punctum
        pickup pencircle xscaled reduced_slt yscaled reduced_il;
-       zc = exact_center +
-               (+0.4reduced_il, 0);
-       zd = exact_center +
-               (+0.0reduced_il, 0);
+       lft zc = exact_center;
+       zd = exact_center + (0.4reduced_il, 0);
        draw zc -- zd;
 
        %right-handed puncta as in do clef
-       draw_medicaea_do_clef(
-               exact_center +
-               (+1.1reduced_il + 1.25stafflinethickness, 0),
-               reduction);
+       draw_medicaea_do_clef(exact_center + (0.7reduced_il, 0), reduction);
 
-       set_char_box(0.5reduced_slt#,
-                    1.6reduced_il# + 1.25stafflinethickness#,
-                    1.5reduced_il#, 1.5reduced_il#);
+       set_char_box(0, 1.7reduced_il#, 1.5reduced_il#, 1.5reduced_il#);
 enddef;
 
 
@@ -723,8 +740,8 @@ def draw_petrucci_g_clef(expr exact_center, reduction) =
        reduced_slt# = stafflinethickness# * reduction;
        define_pixels(reduced_il, reduced_slt);
 
-       set_char_box(0.90 reduced_il#, 0.30 reduced_il#,
-                    0.55 reduced_il#, 3.80 reduced_il#);
+       set_char_box(0, 1.25 reduced_il#,
+                    0.65 reduced_il#, 3.80 reduced_il#);
 
        save za, zb, zc, zd, ze, zf, zg, zh, zi, zj;
        pair za, zb, zc, zd, ze, zf, zg, zh, zi, zj;
@@ -734,16 +751,16 @@ def draw_petrucci_g_clef(expr exact_center, reduction) =
                yscaled 0.22 reduced_il
                rotated -35;
 
-       za = exact_center + (+0.00 reduced_il, +0.00 reduced_il);
-       zb = exact_center + (+0.20 reduced_il, +1.20 reduced_il);
-       zc = exact_center + (-0.10 reduced_il, +2.00 reduced_il);
-       zd = exact_center + (-0.50 reduced_il, +3.00 reduced_il);
-       ze = exact_center + (+0.00 reduced_il, +3.70 reduced_il);
-       zf = exact_center + (+0.20 reduced_il, +3.00 reduced_il);
-       zg = exact_center + (-0.20 reduced_il, +2.00 reduced_il);
-       zh = exact_center + (-0.50 reduced_il, +1.70 reduced_il);
-       zi = exact_center + (-0.80 reduced_il, +0.75 reduced_il);
-       zj = exact_center + (-0.60 reduced_il, +0.60 reduced_il);
+       lft za = exact_center + (0.80 reduced_il, +0.00 reduced_il);
+       lft zb = exact_center + (1.00 reduced_il, +1.20 reduced_il);
+       lft zc = exact_center + (0.70 reduced_il, +2.00 reduced_il);
+       lft zd = exact_center + (0.30 reduced_il, +3.00 reduced_il);
+       lft ze = exact_center + (0.80 reduced_il, +3.70 reduced_il);
+       lft zf = exact_center + (1.00 reduced_il, +3.00 reduced_il);
+       lft zg = exact_center + (0.60 reduced_il, +2.00 reduced_il);
+       lft zh = exact_center + (0.30 reduced_il, +1.70 reduced_il);
+       lft zi = exact_center + (0.00 reduced_il, +0.75 reduced_il);
+       lft zj = exact_center + (0.20 reduced_il, +0.60 reduced_il);
 
        draw za{-1,2} .. zb .. zc .. zd .. ze .. zf .. zg .. zh .. zi .. zj;
 
@@ -755,12 +772,12 @@ def draw_petrucci_g_clef(expr exact_center, reduction) =
                yscaled 0.33 reduced_il
                rotated -35;
 
-       za = exact_center + (+0.25 reduced_il, +0.45 reduced_il);
-       zb = exact_center + (-0.25 reduced_il, +0.45 reduced_il);
-       zc = exact_center + (-0.25 reduced_il, -0.45 reduced_il);
-       zd = exact_center + (+0.25 reduced_il, -0.45 reduced_il);
-       ze = exact_center + (+0.30 reduced_il, +0.00 reduced_il);
-       zf = exact_center + (+0.00 reduced_il, +0.00 reduced_il);
+       lft za = exact_center + (1.05 reduced_il, +0.45 reduced_il);
+       lft zb = exact_center + (0.55 reduced_il, +0.45 reduced_il);
+       lft zc = exact_center + (0.55 reduced_il, -0.45 reduced_il);
+       lft zd = exact_center + (1.05 reduced_il, -0.45 reduced_il);
+       lft ze = exact_center + (1.10 reduced_il, +0.00 reduced_il);
+       lft zf = exact_center + (0.80 reduced_il, +0.00 reduced_il);
 
        draw za .. zb .. zc .. zd .. {up}ze -- zf;
 enddef;
index eac3509eeee5a798390354de560fa7dbc3381d7f..b3fcfc9962f907a1459a8877dd7bf067eb326357 100644 (file)
@@ -1,4 +1,4 @@
-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
 % parmesan-custodes.mf -- implement ancient custodes
 % 
 % source file of LilyPond's pretty-but-neat music font
@@ -11,6 +11,29 @@ numeric black_notehead_width;
 
 fet_begingroup ("custodes")
 
+%
+% 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.
+%
+
 noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
 define_pixels(noteheight);
 
@@ -70,6 +93,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:
@@ -300,6 +324,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:
index 84dbec0cbe5efa8767fc98bf14bd1d48e9c14c3b..ca00403fcecbfcad7f96c849f50d171e319a7451 100644 (file)
@@ -1,4 +1,4 @@
-% -*-Fundamental-*-
+% -%-Fundamental-%- -*-Metafont-*-
 % parmesan-heads.mf -- implement ancient note heads
 % 
 % source file of LilyPond's pretty-but-neat music font
@@ -14,6 +14,26 @@ numeric black_notehead_width;
 
 fet_begingroup ("noteheads")
 
+%
+% character aligment:
+%
+%   The head is assumed to be vertically centered around (0, 0).
+%   The left-most edge of the head 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 match the head's width.
+%
+% * depth: Should match the bottom edge of the head.  Affects vertical
+%   collision handling.
+%
+% * height: Should match the top edge of the head.  Affects vertical
+%   collision handling.
+%
+
 noteheight#:=staff_space# + (1 + overdone_heads)*stafflinethickness#;
 define_pixels(noteheight);