]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/feta-bolletjes.mf
formatting nits
[lilypond.git] / mf / feta-bolletjes.mf
index 7eda902975292ef242ee9811ee850dc92b695efb..b45222e4cc6d06f6b2d00a79bcd7cafcb95fcc97 100644 (file)
@@ -145,6 +145,77 @@ endgroup;
 enddef;
 
 
+%
+% dimensions aren't entirely right.
+%
+def draw_longa (expr up) =
+       save stemthick, fudge;
+
+       stemthick# = 2 stafflinethickness#;
+       define_whole_blacker_pixels (stemthick);
+
+       fudge = hround (blot_diameter / 2);
+
+       draw_outside_ellipse (1.80, 0, 0.707, 0);
+       undraw_inside_ellipse (1.30, 125, 0.68, 2 stafflinethickness#);
+
+       pickup pencircle scaled stemthick;
+
+       if up:
+               bot y1 = -d;
+               y2 = h;
+               rt x1 - fudge = 0;
+               x1 = x2;
+
+               fudge + lft x3 = w;
+               x4 = x3;
+               top y4 = h + 3.0 staff_space;
+               y3 = y1;
+       else:
+               bot y1 = -d - 3.0 staff_space;
+               top y2 = h;
+               rt x1 - fudge = 0;
+               x1 = x2;
+
+               fudge + lft x3 = w;
+               x4 = x3;
+               y4 = y2;
+               bot y3 = -d;
+       fi;
+
+       draw_gridline (z1, z2, stemthick);
+       draw_gridline (z3, z4, stemthick);
+enddef;
+
+
+fet_beginchar ("Longa notehead", "u-2");
+       draw_longa (true);
+
+       draw_staff (-2, 2, 0);
+fet_endchar;
+
+fet_beginchar ("Longa notehead", "d-2");
+       draw_longa (false);
+
+       draw_staff (-2, 2, 0);
+fet_endchar;
+
+
+if test > 0:
+       fet_beginchar ("Longa notehead", "u-2");
+               draw_longa (true);
+
+               draw_staff (-2, 2, 0.5);
+       fet_endchar;
+
+       fet_beginchar ("Longa notehead", "d-2");
+               draw_longa (false);
+
+               draw_staff (-2, 2, 0.5);
+       fet_endchar;
+fi;
+
+
 %
 % dimensions aren't entirely right.
 %
@@ -215,8 +286,6 @@ if test > 0:
 fi;
 
 
-
-
 fet_beginchar ("Half notehead", "s1");
        draw_outside_ellipse (1.53 - puff_up_factor / 3.0, 34, 0.66, 0.17);
        undraw_inside_ellipse (3.25, 33, 0.81, 2.5 stafflinethickness#);
@@ -247,6 +316,7 @@ fet_beginchar ("Quart notehead", "s2");
        draw_staff (-2, 2, 0);
 fet_endchar;
 
+
 if test > 0:
        fet_beginchar ("Quart notehead", "s2");
                draw_outside_ellipse (1.49 - puff_up_factor / 3.0, 31,
@@ -337,8 +407,7 @@ enddef;
 
 
 %
-%
-% UGH : xs not declared as argument.
+% UGH: xs not declared as argument.
 %
 def define_triangle_shape (expr stemdir) =
        save triangle_a, triangle_b, triangle_c;
@@ -376,7 +445,7 @@ def define_triangle_shape (expr stemdir) =
        set_char_box (0, width#, depth#, height#);
 
        % Formerly, the shape has simply been drawn with an elliptical pen
-       % (`scaled pen_thick xsaled xs'), but the envelope of such a curve
+       % (`scaled pen_thick xscaled xs'), but the envelope of such a curve
        % is of 6th degree.  For the sake of mf2pt1, we approximate it.
 
        pickup pencircle scaled pen_thick xscaled xs;
@@ -452,7 +521,7 @@ def define_triangle_shape (expr stemdir) =
                charwx := xpart exact_right_point + .5 pen_thick# * xs;
        else:
                charwy := -ypart exact_down_point;
-               charwx := (width# - xpart exact_down_point + xs * pen_thick#);
+               charwx := width# - (xpart exact_down_point - .5 pen_thick# * xs);
        fi
 enddef;
 
@@ -1009,7 +1078,7 @@ def draw_re_head (expr width_factor, dir) =
        save p_in, p_out;
        path p_in, p_out;
 
-       set_char_box (0, width_factor * solfa_noteheight#,
+       set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
 
        pickup pencircle scaled solfa_pen_thick;
@@ -1093,7 +1162,7 @@ def draw_mi_head (expr width_factor) =
        path path_out, path_in;
        pair ne_dist, se_dist, ne, se;
 
-       set_char_box (0, width_factor * solfa_noteheight#,
+       set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
 
        pickup pencircle scaled solfa_pen_thick;
@@ -1168,7 +1237,7 @@ fet_endchar;
 
 
 def draw_fa_head (expr width_factor) =
-       set_char_box (0, width_factor * solfa_noteheight#,
+       set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
 
        save p_down_in, p_down_out, p_up_in, p_up_out, nw_dist, nw;
@@ -1259,7 +1328,7 @@ fet_endchar;
 
 
 def draw_la_head (expr width_factor) =
-       set_char_box (0, width_factor * solfa_noteheight#,
+       set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
        save p_in, p_out;
        path p_in, p_out;
@@ -1318,7 +1387,7 @@ fet_endchar;
 
 
 def draw_ti_head (expr width_factor, dir) =
-       set_char_box (0, width_factor * solfa_noteheight#,
+       set_char_box (0, width_factor * solfa_base_notewidth#,
                      0.5 solfa_noteheight#, 0.5 solfa_noteheight#);
        save p_in, p_out, p_top;
        save nw_dist, sw_dist, nw, sw;