summaryrefslogtreecommitdiff
path: root/mf
diff options
context:
space:
mode:
authorPhil Holmes <mail@philholmes.net>2013-07-29 16:09:29 +0100
committerPhil Holmes <mail@philholmes.net>2013-08-05 11:00:25 +0100
commitf494ef0afc8aed378bd778cd51a294804a8ee5d4 (patch)
treee00962ba08ec86c03c287a5fdb0e1928e4fd2706 /mf
parent457ad54d27d8ef70664f958d458d7cae364d54af (diff)
Corrects bounding box for longa (Issue 826)
Diffstat (limited to 'mf')
-rw-r--r--mf/feta-noteheads.mf16
1 files changed, 12 insertions, 4 deletions
diff --git a/mf/feta-noteheads.mf b/mf/feta-noteheads.mf
index df433e98d2..82abf14e54 100644
--- a/mf/feta-noteheads.mf
+++ b/mf/feta-noteheads.mf
@@ -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;