From: Han-Wen Nienhuys Date: Tue, 23 Aug 2005 10:28:03 +0000 (+0000) Subject: * lily/system-start-delimiter.cc (staff_brace): don't remove brace X-Git-Tag: release/2.7.8~38 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=75b6aae6cb402aae12cf4a39a4c5097c464472df;p=lilypond.git * lily/system-start-delimiter.cc (staff_brace): don't remove brace extent. This fixes braces falling out of the EPS bbox. * mf/feta-beugel.mf (braces_per_font): make brace glyph align exactly to bbox. --- diff --git a/ChangeLog b/ChangeLog index 0ab30acddd..de6f42650e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ + +2005-08-23 Han-Wen Nienhuys + + * lily/system-start-delimiter.cc (staff_brace): don't remove brace + extent. This fixes braces falling out of the EPS bbox. + + * mf/feta-beugel.mf (braces_per_font): make brace glyph align + exactly to bbox. + 2005-08-23 Graham Percival * {various} : change #up->#UP and #down->#DOWN. diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc index fbf24c662e..24be5bb595 100644 --- a/lily/system-start-delimiter.cc +++ b/lily/system-start-delimiter.cc @@ -164,9 +164,9 @@ System_start_delimiter::staff_brace (Grob *me, Real y) int lo = 0; int hi = max (fm->count () - 1, 2); - Box b; /* do a binary search for each Y, not very efficient, but passable? */ + Box b; do { int cmp = (lo + hi) / 2; @@ -179,14 +179,17 @@ System_start_delimiter::staff_brace (Grob *me, Real y) while (hi - lo > 1); Stencil stil (fm->find_by_name ("brace" + to_string (lo))); - b = stil.extent_box (); - b[X_AXIS] = Interval (0, 0); + stil.translate_axis (-b[X_AXIS].length()/2, X_AXIS); - return Stencil (b, stil.expr ()); + return stil; } ADD_INTERFACE (System_start_delimiter, "system-start-delimiter-interface", "The brace, bracket or bar in front of the system. " "It is implemented as a spanner.", - "collapse-height thickness " - "glyph"); + + /* properties */ + "collapse-height " + "glyph " + "thickness " + ); diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index f87c7edbf4..8196f3d94a 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -1,5 +1,5 @@ % -% feta-beugel.mf -- [Staff] braces +% feta-beugel.mf -- Staff braces % % source file of the Feta (not an acronym for Font-En-Tja) % pretty-but-neat music font @@ -41,7 +41,7 @@ def draw_brace (expr height_sharp, width_sharp, slt_sharp, brace_number) = fet_beginchar ("brace number " & (decimal (brace_number)), "brace" & decimal(brace_number)) - set_char_box (0, width#, height#/2, height#/2); + set_char_box (width#, 0, height#/2, height#/2); define_pixels (height, width, slt); thin = 2 slt; @@ -51,7 +51,7 @@ fet_beginchar ("brace number " & (decimal (brace_number)), y3l = y1 + height/2; x3 = x1 + width; y1 =0; - x3 = - width / 2; + x1 = - b; pair pendir; pendir = unitvector(x3 - x1, y3l/6 - y1);