]> git.donarmstrong.com Git - lilypond.git/commitdiff
Corrects bounding box for longa (Issue 826)
authorPhil Holmes <mail@philholmes.net>
Mon, 29 Jul 2013 15:09:29 +0000 (16:09 +0100)
committerPhil Holmes <mail@philholmes.net>
Mon, 5 Aug 2013 10:00:25 +0000 (11:00 +0100)
mf/feta-noteheads.mf

index df433e98d22dfb48f9ea7ae701d8f83a15f76d62..82abf14e54bf3fb3ede1de6caab4cb6609a0f1cc 100644 (file)
@@ -112,13 +112,12 @@ def draw_longa (expr up) =
                quanted_line_length := max (0.77, line_length);
        fi;
 
-       set_char_box (stemthick#,
-                     width# + stemthick#,
-                     staff_space# * quanted_line_length,
-                     staff_space# * quanted_line_length);
 
        final_line_length := quanted_line_length * staff_space;
 
+       save boxtop, boxbot;
+       define_pixels (boxtop, boxbot);
+
        if up:
                bot y1 = -final_line_length;
                top y2 = final_line_length;
@@ -129,6 +128,8 @@ def draw_longa (expr up) =
                x4 = x3;
                top y4 = h + 3.0 staff_space;
                y3 = y1;
+               boxtop# := staff_space# * (quanted_line_length + 3.0) - stemthick# ;
+               boxbot# := staff_space# * quanted_line_length;
        else:
                bot y1 = -d - 3.0 staff_space;
                top y2 = final_line_length;
@@ -139,11 +140,18 @@ def draw_longa (expr up) =
                x4 = x3;
                y4 = y2;
                bot y3 = -final_line_length;
+               boxtop# := staff_space# * quanted_line_length;
+               boxbot# := staff_space# * (quanted_line_length + 3.0) - stemthick# ;
        fi;
 
        draw_gridline (z1, z2, stemthick);
        draw_gridline (z3, z4, stemthick);
 
+       set_char_box (stemthick#,
+                     width# + stemthick#,
+                     boxbot#,
+                     boxtop#);
+
        labels (1, 2, 3, 4);
 enddef;