+ 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.flatflat")
+ {
+ // a bit more padding for the right of the stem
+ // we raise the stem horizontally to a bit less than the average
+ // horizontal "height" of the entire glyph. This will bring flats
+ // closer to doubleflats, which looks better (MS opinion).
+ // this should work for all fonts where the flat is not
+ // completely bizarre
+ Real left = my_stencil->extent (X_AXIS)[LEFT];
+ Real right = my_stencil->extent (X_AXIS)[RIGHT] * 0.375;
+ Real down = my_stencil->extent (Y_AXIS)[DOWN];
+ Real up = my_stencil->extent (Y_AXIS)[UP];
+ vector<Box> boxes;
+ boxes.push_back (Box (Interval (left, right), Interval (down, up)));
+ Skyline merge_with_me (boxes, Y_AXIS, RIGHT);
+ (*sky)[RIGHT].merge (merge_with_me);
+ }
+ return sky->smobbed_copy ();