X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faccidental.cc;h=3e5d0475f7afa671f23187b9616e8f81ef70df0a;hb=ff69d69350ae17cece443b5ef4a666e0bc8b6c84;hp=571c33cbea497e5c8db3cf9eaa305c5b154dc952;hpb=ade2bb7da653fbd9d670590afd67376fe69c59dd;p=lilypond.git diff --git a/lily/accidental.cc b/lily/accidental.cc index 571c33cbea..3e5d0475f7 100644 --- a/lily/accidental.cc +++ b/lily/accidental.cc @@ -72,9 +72,13 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common) if (!to_boolean (me->get_property ("restore-first")) && !parens) { - Rational alteration - = robust_scm2rational (me->get_property ("alteration"), 0); - if (alteration == FLAT_ALTERATION) + SCM alist = me->get_property ("glyph-name-alist"); + SCM alt = me->get_property ("alteration"); + string glyph_name = robust_scm2string (ly_assoc_get (alt, alist, SCM_BOOL_F), + ""); + + if (glyph_name == "accidentals.flat" + || glyph_name == "accidentals.mirroredflat") { Box stem = b; Box bulb = b; @@ -83,7 +87,9 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common) we could make the stem thinner, but that places the flats really close. */ - stem[X_AXIS][RIGHT] *= .5; + Direction bulb_dir = + glyph_name=="accidentals.mirroredflat" ? LEFT : RIGHT; + stem[X_AXIS][bulb_dir] = stem[X_AXIS].center (); /* To prevent vertical alignment for 6ths @@ -94,7 +100,7 @@ Accidental_interface::accurate_boxes (Grob *me, Grob **common) boxes.push_back (bulb); boxes.push_back (stem); } - else if (alteration == NATURAL_ALTERATION) + else if (glyph_name == "accidentals.natural") { Box lstem = b; Box rstem = b;