From f494ef0afc8aed378bd778cd51a294804a8ee5d4 Mon Sep 17 00:00:00 2001 From: Phil Holmes Date: Mon, 29 Jul 2013 16:09:29 +0100 Subject: [PATCH] Corrects bounding box for longa (Issue 826) --- mf/feta-noteheads.mf | 16 ++++++++++++---- 1 file 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; -- 2.39.2