Reviewers: ,
Message:
Minor patch that adds a useful glyph for baroque music.
Description:
New breve rest with ledger lines
Please review this at http://codereview.appspot.com/4650052/
Affected files:
M lily/rest.cc
M mf/feta-rests.mf
Index: lily/rest.cc
diff --git a/lily/rest.cc b/lily/rest.cc
index
9b85523f80ae2840ad273f8b1626891ef8f7493c..dcc7bdc2e643f9f05f1036b8ae6de91de7347470
100644
--- a/lily/rest.cc
+++ b/lily/rest.cc
@@ -80,7 +80,7 @@ string
Rest::glyph_name (Grob *me, int balltype, string style, bool try_ledgers)
{
bool is_ledgered = false;
- if (try_ledgers && (balltype == 0 || balltype == 1))
+ if (try_ledgers && (balltype == 0 || balltype == 1 || balltype == -1))
{
Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0;
Real pos = Staff_symbol_referencer::get_position (me);
@@ -92,6 +92,7 @@ Rest::glyph_name (Grob *me, int balltype, string style,
bool try_ledgers)
*/
is_ledgered |= (balltype == 0) && (pos >= +rad + 2 || pos < -rad);
is_ledgered |= (balltype == 1) && (pos <= -rad - 2 || pos > +rad);
+ is_ledgered |= (balltype == -1) && (pos <= -rad - 3 || pos >= +rad +
2);
}
string actual_style (style.c_str ());
Index: mf/feta-rests.mf
diff --git a/mf/feta-rests.mf b/mf/feta-rests.mf
index
4f270801793997ead28f603db6703fc950eaf107..1e416d36d37f8b40a861dd72c39ef523afba3a95
100644
--- a/mf/feta-rests.mf
+++ b/mf/feta-rests.mf
@@ -125,6 +125,24 @@ fet_beginchar ("breve rest", "M1");
draw_staff (-2, 2, 0);
fet_endchar;
+fet_beginchar ("breve rest (outside staff)", "M1o");
+ set_char_box (0, breve_rest_x#,
+ ledgerlinethickness# / 2, breve_rest_y#);
+
+ draw_block ((0, 0), (breve_rest_x, breve_rest_y));
+
+ pickup pencircle scaled ledgerlinethickness;
+
+ y5 = y6 = breve_rest_y;
+ lft x5 = -b - breve_rest_y / 2;
+ rt x6 = w + breve_rest_y / 2;
+
+ draw_gridline (z5, z6, ledgerlinethickness_rounded);
+ draw_gridline ((x5, 0), (x6, 0), ledgerlinethickness_rounded);
+
+ draw_staff (-2, 2, 3);
+fet_endchar;
+
fet_beginchar ("Quarter rest", "2");
save alpha, yshift, height;
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel