--- /dev/null
+\header {
+
+ texidoc = "With the @code{padding-pairs} property, distances
+ between individual key signature items can be adjusted."
+
+}
+
+\version "2.11.32"
+
+{
+ \override Staff.KeySignature #'padding-pairs
+ = #'((("accidentals.flat" . "accidentals.sharp.slashslash.stemstemstem") . 0.5))
+ \set Staff.keySignature = #`((2 . ,SEMI-FLAT) (6 . ,THREE-Q-SHARP) (4 . ,FLAT))
+ e2
+}
*/
int last_pos = -1000;
+ SCM last_glyph_name = SCM_BOOL_F;
+ SCM padding_pairs = me->get_property ("padding-pairs");
+
Font_metric *fm = Font_interface::get_default_font (me);
SCM alist = me->get_property ("glyph-name-alist");
*/
Real padding = robust_scm2double (me->get_property ("padding"),
0.0);
- if (glyph_name == "accidentals.natural"
+ SCM handle = scm_assoc (scm_cons (glyph_name_scm, last_glyph_name),
+ padding_pairs);
+ if (scm_is_pair (handle))
+ padding = robust_scm2double (scm_cdr (handle), 0.0);
+ else if (glyph_name == "accidentals.natural"
&& last_pos < pos + 2
&& last_pos > pos - 6)
padding += 0.3;
mol.add_at_edge (X_AXIS, LEFT, acc, padding);
+
last_pos = pos;
+ last_glyph_name = glyph_name_scm;
}
}
"c0-position "
"glyph-name-alist "
"padding "
+ "padding-pairs "
"style "
);
(note-head ,ly:grob? "A single note head.")
(note-heads ,ly:grob-array? "A list of note head grobs.")
+ (padding-pairs ,list? "An alist mapping (@var{name} . @var{name}) to distances.")
(pedal-text ,ly:grob? "A pointer to the text of a mixed-style piano
pedal.")
(pure-Y-common ,ly:grob? "A cache of the