Changes the spanner-placement property of FootnoteSpanner to ly:dir
[lilypond/patrick.git] / scm / define-grobs.scm
blob6e4faedf405734df2ab216b63f5190efa9395377
1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;;
3 ;;;; Copyright (C) 1998--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
4 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version.
10 ;;;;
11 ;;;; LilyPond is distributed in the hope that it will be useful,
12 ;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 ;;;; GNU General Public License for more details.
15 ;;;;
16 ;;;; You should have received a copy of the GNU General Public License
17 ;;;; along with LilyPond.  If not, see <http://www.gnu.org/licenses/>.
19 ;;;; distances are given in line-thickness (thicknesses) and
20 ;;;; staff-space (distances)
22 ;;;; WARNING: the meta field should be the last one.
23 ;;;; WARNING: don't use anonymous functions for initialization.
25 ;; TODO: junk the meta field in favor of something more compact?
27 (define-public all-grob-descriptions
28   `(
29     (Accidental
30      . (
31         (alteration . ,accidental-interface::calc-alteration)
32         (avoid-slur . inside)
33         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
34         (stencil . ,ly:accidental-interface::print)
35         (X-extent . ,ly:accidental-interface::width)
36         (Y-extent . ,ly:accidental-interface::height)
37         (meta . ((class . Item)
38                  (interfaces . (accidental-interface
39                                 font-interface))))))
41     (AccidentalCautionary
42      . (
43         (alteration . ,accidental-interface::calc-alteration)
44         (avoid-slur . inside)
45         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
46         (parenthesized . #t)
47         (stencil . ,ly:accidental-interface::print)
48         (Y-extent . ,ly:accidental-interface::height)
49         (meta . ((class . Item)
50                  (interfaces . (accidental-interface
51                                 font-interface))))))
53     (AccidentalPlacement
54      . (
55         (direction .  ,LEFT)
56         (positioning-done . ,ly:accidental-placement::calc-positioning-done)
58         ;; this is quite small, but it is very ugly to have
59         ;; accs closer to the previous note than to the next one.
60         (right-padding . 0.15)
62         ;; for horizontally stacked scripts.
63         (script-priority .  -100)
65         (X-extent . ,ly:axis-group-interface::width)
66         (meta . ((class . Item)
67                  (interfaces . (accidental-placement-interface))))))
69     (AccidentalSuggestion
70      . (
71         (alteration . ,accidental-interface::calc-alteration)
72         (direction . ,UP)
73         (font-size . -2)
74         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
75         (outside-staff-priority . 0)
76         (script-priority . 0)
77         (self-alignment-X . ,CENTER)
78         (side-axis . ,Y)
79         (staff-padding . 0.25)
80         (stencil . ,ly:accidental-interface::print)
81         (X-extent . ,ly:accidental-interface::width)
82         (X-offset . ,(ly:make-simple-closure
83                       `(,+
84                         ,(ly:make-simple-closure
85                           (list ly:self-alignment-interface::centered-on-x-parent))
86                         ,(ly:make-simple-closure
87                           (list ly:self-alignment-interface::x-aligned-on-self)))))
88         (Y-extent . ,ly:accidental-interface::height)
89         (Y-offset . ,ly:side-position-interface::y-aligned-side)
90         (meta . ((class . Item)
91                  (interfaces . (accidental-interface
92                                 accidental-suggestion-interface
93                                 font-interface
94                                 script-interface
95                                 self-alignment-interface
96                                 side-position-interface))))))
98     (Ambitus
99      . (
100         (axes . (,X ,Y))
101         (break-align-symbol . ambitus)
102         (break-visibility . ,begin-of-line-visible)
103         (non-musical . #t)
104         (space-alist . (
105                         (cue-end-clef . (extra-space . 0.5))
106                         (clef . (extra-space . 0.5))
107                         (cue-clef . (extra-space . 0.5))
108                         (key-signature . (extra-space . 0.0))
109                         (staff-bar . (extra-space . 0.0))
110                         (time-signature . (extra-space . 0.0))
111                         (first-note . (fixed-space . 0.0))))
112         (X-extent . ,ly:axis-group-interface::width)
113         (Y-extent . ,ly:axis-group-interface::height)
114         (meta . ((class . Item)
115                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
116                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
117                  (interfaces . (ambitus-interface
118                                 axis-group-interface
119                                 break-aligned-interface))))))
121     (AmbitusAccidental
122      . (
123         (direction . ,LEFT)
124         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
125         (padding . 0.5)
126         (side-axis . ,X)
127         (stencil . ,ly:accidental-interface::print)
128         (X-offset . ,ly:side-position-interface::x-aligned-side)
129         (Y-extent . ,ly:accidental-interface::height)
130         (meta . ((class . Item)
131                  (interfaces . (accidental-interface
132                                 break-aligned-interface
133                                 font-interface
134                                 side-position-interface))))))
136     (AmbitusLine
137      . (
138         (gap . 0.35)
139         (stencil . ,ambitus::print)
140         (thickness . 2)
141         (X-offset . ,ly:self-alignment-interface::centered-on-x-parent)
142         (meta . ((class . Item)
143                  (interfaces . (ambitus-interface
144                                 font-interface))))))
146     (AmbitusNoteHead
147      . (
148         (duration-log . 2)
149         (glyph-name . ,note-head::calc-glyph-name)
150         (stencil . ,ly:note-head::print)
151         (Y-offset . ,ly:staff-symbol-referencer::callback)
152         (meta . ((class . Item)
153                  (interfaces . (ambitus-interface
154                                 font-interface
155                                 ledgered-interface
156                                 note-head-interface
157                                 rhythmic-head-interface
158                                 staff-symbol-referencer-interface))))))
160     (Arpeggio
161      . (
162         (direction . ,LEFT)
163         (padding . 0.5)
164         (positions . ,ly:arpeggio::calc-positions)
165         (script-priority . 0)
166         (side-axis . ,X)
167         (staff-position . 0.0)
168         (stencil . ,ly:arpeggio::print)
169         (X-extent . ,ly:arpeggio::width)
170         (X-offset . ,ly:side-position-interface::x-aligned-side)
171         (Y-offset . ,ly:staff-symbol-referencer::callback)
172         (meta . ((class . Item)
173                  (interfaces . (arpeggio-interface
174                                 font-interface
175                                 side-position-interface
176                                 staff-symbol-referencer-interface))))))
178     (BalloonTextItem
179      . (
180         (annotation-balloon . #t)
181         (annotation-line . #t)
182         (stencil . ,ly:balloon-interface::print)
183         (text . ,(grob::calc-property-by-copy 'text))
184         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
185         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
186         (meta . ((class . Item)
187                  (interfaces . (balloon-interface
188                                 font-interface
189                                 text-interface))))))
191     (BarLine
192      . (
193         (allow-span-bar . #t)
194         (bar-extent . ,ly:bar-line::calc-bar-extent)
195         (break-align-anchor . ,ly:bar-line::calc-anchor)
196         (break-align-symbol . staff-bar)
197         (break-visibility . ,bar-line::calc-break-visibility)
198         (gap . 0.4)
199         (glyph . "|")
200         (glyph-name . ,bar-line::calc-glyph-name)
202         ;;
203         ;; Ross. page 151 lists other values, we opt for a leaner look
204         ;;
205         ;; TODO:
206         ;; kern should scale with line-thickness too.
207         (kern . 3.0)
208         (thin-kern . 3.0)
209         (hair-thickness . 1.9)
210         (thick-thickness . 6.0)
212         (layer . 0)
213         (non-musical . #t)
214         (space-alist . (
215                         (time-signature . (extra-space . 0.75))
216                         (custos . (minimum-space . 2.0))
217                         (clef . (minimum-space . 1.0))
218                         (key-signature . (extra-space . 1.0))
219                         (key-cancellation . (extra-space . 1.0))
220                         (first-note . (fixed-space . 1.3))
221                         (next-note . (semi-fixed-space . 0.9))
222                         (right-edge . (extra-space . 0.0))))
223         (stencil . ,ly:bar-line::print)
224         (meta . ((class . Item)
225                  (interfaces . (bar-line-interface
226                                 break-aligned-interface
227                                 font-interface))))))
229     (BarNumber
230      . (
231         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
232         ;; want the bar number before the clef at line start.
233         (break-align-symbols . (left-edge staff-bar))
235         (break-visibility . ,begin-of-line-visible)
236         (direction . ,UP)
237         (font-family . roman)
238         (font-size . -2)
239         (non-musical . #t)
240         (outside-staff-priority . 100)
241         (padding . 1.0)
242         (self-alignment-X . ,RIGHT)
243         (side-axis . ,Y)
244         (stencil . ,ly:text-interface::print)
245         (X-offset . ,(ly:make-simple-closure
246                       `(,+
247                         ,(ly:make-simple-closure
248                           (list ly:break-alignable-interface::self-align-callback))
249                         ,(ly:make-simple-closure
250                           (list ly:self-alignment-interface::x-aligned-on-self)))))
251         (Y-offset . ,ly:side-position-interface::y-aligned-side)
252         (meta .
253               ((class . Item)
254                (interfaces . (break-alignable-interface
255                               font-interface
256                               self-alignment-interface
257                               side-position-interface
258                               text-interface))))))
260     (BassFigure
261      . (
262         (stencil . ,ly:text-interface::print)
263         (meta . ((class . Item)
264                  (interfaces . (bass-figure-interface
265                                 font-interface
266                                 rhythmic-grob-interface
267                                 text-interface))))))
269     (BassFigureAlignment
270      . (
271         (axes . (,Y))
272         (padding . 0.2)
273         (positioning-done . ,ly:align-interface::align-to-minimum-distances)
274         (stacking-dir . ,DOWN)
275         (Y-extent . ,ly:axis-group-interface::height)
276         (meta . ((class . Spanner)
277                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
278                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
279                  (interfaces . (align-interface
280                                 axis-group-interface
281                                 bass-figure-alignment-interface))))))
283     (BassFigureAlignmentPositioning
284      . (
285         (axes . (,Y))
286         (direction . ,UP)
287         (padding . 0.5)
288         (side-axis . ,Y)
289         (staff-padding . 1.0)
290         (Y-extent . ,ly:axis-group-interface::height)
291         (Y-offset . ,ly:side-position-interface::y-aligned-side)
292         (meta . ((class . Spanner)
293                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
294                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
295                  (interfaces . (axis-group-interface
296                                 side-position-interface))))))
298     (BassFigureBracket
299      . (
300         (edge-height . (0.2 . 0.2))
301         (stencil . ,ly:enclosing-bracket::print)
302         (X-extent . ,ly:enclosing-bracket::width)
303         (meta . ((class . Item)
304                  (interfaces . (enclosing-bracket-interface))))))
306     (BassFigureContinuation
307      . (
308         (stencil . ,ly:figured-bass-continuation::print)
309         (Y-offset . ,ly:figured-bass-continuation::center-on-figures)
310         (meta . ((class . Spanner)
311                  (interfaces . (figured-bass-continuation-interface))))))
313     (BassFigureLine
314      . (
315         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
316         (axes . (,Y))
317         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
318         (Y-extent . ,ly:axis-group-interface::height)
319         (meta . ((class . Spanner)
320                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
321                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
322                  (interfaces . (axis-group-interface))))))
325     (Beam
326      . (
327         ;; todo: clean this up a bit: the list is getting
328         ;; rather long.
330         (auto-knee-gap . 5.5)
331         (beam-thickness . 0.48) ; in staff-space
333         ;; We have some unreferenced problems here.
334         ;;
335         ;; If we shorten beamed stems less than normal stems (1 staff-space),
336         ;; or high order less than 8th beams, patterns like
337         ;;     c''4 [c''8 c''] c''4 [c''16 c]
338         ;; are ugly (different stem lengths).
339         ;;
340         ;; But if we shorten 16th beams as much as 8th beams, a single
341         ;; forced 16th beam looks *very* short.
343         ;; We choose to shorten 8th beams the same as single stems,
344         ;; and high order beams less than 8th beams, so that all
345         ;; isolated shortened beams look nice and a bit shortened,
346         ;; sadly possibly breaking patterns with high order beams.
347         (beamed-stem-shorten . (1.0 0.5 0.25))
349         (beaming . ,ly:beam::calc-beaming)
350         (clip-edges . #t)
351         (concaveness . ,ly:beam::calc-concaveness)
352         (cross-staff . ,ly:beam::calc-cross-staff)
353         (damping . 1)
354         (details
355          .(
356            (secondary-beam-demerit . 10)
357            (stem-length-demerit-factor . 5)
358            (region-size . 2)
359            (beam-eps . 0.001)
360            (stem-length-limit-penalty . 5000)
361            (damping-direction-penalty . 800)
362            (hint-direction-penalty . 20)
363            (musical-direction-factor . 400)
364            (ideal-slope-factor . 10)
365            (collision-penalty . 500)
366            (collision-padding . 0.35)
367            (round-to-zero-slope . 0.02)))
368         (direction . ,ly:beam::calc-direction)
370         ;; only for debugging.
371         (font-family . roman)
373         (gap . 0.8)
374         (neutral-direction . ,DOWN)
375         (positions .  ,(ly:make-simple-closure
376                         (ly:make-simple-closure
377                          (list chain-grob-member-functions
378                            `(,cons 0 0)
379                            ly:beam::calc-least-squares-positions
380                            ly:beam::slope-damping
381                            ly:beam::shift-region-to-valid
382                            ly:beam::quanting
383                            ))))
385         ;; this is a hack to set stem lengths, if positions is set.
386         (quantized-positions . ,ly:beam::set-stem-lengths)
388         (shorten . ,ly:beam::calc-stem-shorten)
389         (stencil . ,ly:beam::print)
391         (meta . ((class . Spanner)
392                  (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems)))
393                  (interfaces . (beam-interface
394                                 font-interface
395                                 staff-symbol-referencer-interface
396                                 unbreakable-spanner-interface))))))
398     (BendAfter
399      . (
400         (minimum-length . 0.5)
401         (stencil . ,bend::print)
402         (thickness . 2.0)
403         (meta . ((class . Spanner)
404                  (interfaces . (bend-after-interface
405                                 spanner-interface))))))
407     (BreakAlignGroup
408      . (
409         (axes . (,X))
410         (break-align-anchor . ,ly:break-aligned-interface::calc-average-anchor)
411         (break-visibility . ,ly:break-aligned-interface::calc-break-visibility)
412         (X-extent . ,ly:axis-group-interface::width)
413         (meta . ((class . Item)
414                  (interfaces . (axis-group-interface
415                                 break-aligned-interface))))))
417     (BreakAlignment
418      . (
419         (axes . (,X))
420         (break-align-orders . ;; end of line
421                             #((
422                                left-edge
423                                cue-end-clef
424                                ambitus
425                                breathing-sign
426                                clef
427                                cue-clef
428                                staff-bar
429                                key-cancellation
430                                key-signature
431                                time-signature
432                                custos)
434                               ;; unbroken
435                               (
436                                left-edge
437                                cue-end-clef
438                                ambitus
439                                breathing-sign
440                                clef
441                                cue-clef
442                                staff-bar
443                                key-cancellation
444                                key-signature
445                                time-signature
446                                custos)
448                               ;; begin of line
449                               (
450                                left-edge
451                                ambitus
452                                breathing-sign
453                                clef
454                                key-cancellation
455                                key-signature
456                                staff-bar
457                                time-signature
458                                cue-clef
459                                custos)))
460         (non-musical . #t)
461         (positioning-done . ,ly:break-alignment-interface::calc-positioning-done)
462         (stacking-dir . 1)
463         (X-extent . ,ly:axis-group-interface::width)
464         (meta . ((class . Item)
465                  (interfaces . (axis-group-interface
466                                 break-alignment-interface))))))
468     (BreathingSign
469      . (
470         (break-align-symbol . breathing-sign)
471         (break-visibility . ,begin-of-line-invisible)
472         (non-musical . #t)
473         (space-alist . (
474                         (ambitus . (extra-space . 2.0))
475                         (custos . (minimum-space . 1.0))
476                         (key-signature . (minimum-space . 1.5))
477                         (time-signature . (minimum-space . 1.5))
478                         (staff-bar . (minimum-space . 1.5))
479                         (clef . (minimum-space . 2.0))
480                         (cue-clef . (minimum-space . 2.0))
481                         (cue-end-clef . (minimum-space . 2.0))
482                         (first-note . (fixed-space . 1.0)) ;huh?
483                         (right-edge . (extra-space . 0.1))))
484         (stencil . ,ly:text-interface::print)
485         (text . ,(make-musicglyph-markup "scripts.rcomma"))
486         (Y-offset . ,ly:breathing-sign::offset-callback)
487         (meta . ((class . Item)
488                  (interfaces . (break-aligned-interface
489                                 breathing-sign-interface
490                                 font-interface
491                                 text-interface))))))
493     (ChordName
494      . (
495         (after-line-breaking . ,ly:chord-name::after-line-breaking)
496         (font-family . sans)
497         (font-size . 1.5)
498         (stencil . ,ly:text-interface::print)
499         (extra-spacing-height . (0.2 . -0.2))
500         (word-space . 0.0)
501         (meta . ((class . Item)
502                  (interfaces . (chord-name-interface
503                                 font-interface
504                                 rhythmic-grob-interface
505                                 text-interface))))))
507     (Clef
508      . (
509         (avoid-slur . inside)
510         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
511         (break-align-symbol . clef)
512         (break-visibility . ,begin-of-line-visible)
513         (glyph-name . ,ly:clef::calc-glyph-name)
514         (non-musical . #t)
515         (space-alist . ((cue-clef . (extra-space . 2.0))
516                         (staff-bar . (extra-space . 0.7))
517                         (key-cancellation . (minimum-space . 3.5))
518                         (key-signature . (minimum-space . 3.5))
519                         (time-signature . (minimum-space . 4.2))
520                         (first-note . (minimum-fixed-space . 5.0))
521                         (next-note . (extra-space . 0.5))
522                         (right-edge . (extra-space . 0.5))))
523         (stencil . ,ly:clef::print)
524         (Y-offset . ,ly:staff-symbol-referencer::callback)
525         (meta . ((class . Item)
526                  (interfaces . (break-aligned-interface
527                                 clef-interface
528                                 font-interface
529                                 staff-symbol-referencer-interface))))))
531     (ClusterSpanner
532      . (
533         (cross-staff . ,ly:cluster::calc-cross-staff)
534         (minimum-length . 0.0)
535         (padding . 0.25)
536         (springs-and-rods . ,ly:spanner::set-spacing-rods)
537         (stencil . ,ly:cluster::print)
538         (style . ramp)
539         (meta . ((class . Spanner)
540                  (interfaces . (cluster-interface))))))
542     (ClusterSpannerBeacon
543      . (
544         (Y-extent . ,ly:cluster-beacon::height)
545         (meta . ((class . Item)
546                  (interfaces . (cluster-beacon-interface
547                                 rhythmic-grob-interface))))))
549     (CombineTextScript
550      . (
551         (avoid-slur . outside)
552         (baseline-skip . 2)
553         (direction . ,UP)
554         (extra-spacing-width . (+inf.0 . -inf.0))
555         (font-series . bold)
556         (outside-staff-priority . 450)
557         (padding . 0.5)
558         (script-priority . 200)
559         (side-axis . ,Y)
560         (staff-padding . 0.5)
561         ;; todo: add X self alignment?
562         (stencil . ,ly:text-interface::print)
563         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
564         (Y-offset . ,ly:side-position-interface::y-aligned-side)
565         (meta . ((class . Item)
566                  (interfaces . (font-interface
567                                 side-position-interface
568                                 text-interface
569                                 text-script-interface))))))
571     (CueClef
572      . (
573         (avoid-slur . inside)
574         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
575         (break-align-symbol . cue-clef)
576         (break-visibility . ,begin-of-line-visible)
577         (font-size . -4)
578         (glyph-name . ,ly:clef::calc-glyph-name)
579         (non-musical . #t)
580         (full-size-change . #t)
581         (space-alist . ((staff-bar . (minimum-space . 2.7))
582                         (key-cancellation . (minimum-space . 3.5))
583                         (key-signature . (minimum-space . 3.5))
584                         (time-signature . (minimum-space . 4.2))
585                         (custos . (minimum-space . 0.0))
586                         (first-note . (minimum-fixed-space . 3.0))
587                         (next-note . (extra-space . 0.5))
588                         (right-edge . (extra-space . 0.5))))
589         (stencil . ,ly:clef::print)
590         (Y-offset . ,ly:staff-symbol-referencer::callback)
591         (meta . ((class . Item)
592                  (interfaces . (break-aligned-interface
593                                 clef-interface
594                                 font-interface
595                                 staff-symbol-referencer-interface))))))
597     (CueEndClef
598      . (
599         (avoid-slur . inside)
600         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
601         (break-align-symbol . cue-end-clef)
602         (break-visibility . ,begin-of-line-invisible)
603         (font-size . -4)
604         (glyph-name . ,ly:clef::calc-glyph-name)
605         (non-musical . #t)
606         (full-size-change . #t)
607         (space-alist . ((clef . (extra-space . 0.7))
608                         (cue-clef . (extra-space . 0.7))
609                         (staff-bar . (extra-space . 0.7))
610                         (key-cancellation . (minimum-space . 3.5))
611                         (key-signature . (minimum-space . 3.5))
612                         (time-signature . (minimum-space . 4.2))
613                         (first-note . (minimum-fixed-space . 5.0))
614                         (next-note . (extra-space . 0.5))
615                         (right-edge . (extra-space . 0.5))))
616         (stencil . ,ly:clef::print)
617         (Y-offset . ,ly:staff-symbol-referencer::callback)
618         (meta . ((class . Item)
619                  (interfaces . (break-aligned-interface
620                                 clef-interface
621                                 font-interface
622                                 staff-symbol-referencer-interface))))))
624     (Custos
625      . (
626         (break-align-symbol . custos)
627         (break-visibility . ,end-of-line-visible)
628         (neutral-direction . ,DOWN)
629         (non-musical . #t)
630         (space-alist . (
631                         (first-note . (minimum-fixed-space . 0.0))
632                         (right-edge . (extra-space . 0.1))))
633         (stencil . ,ly:custos::print)
634         (style . vaticana)
635         (Y-offset . ,ly:staff-symbol-referencer::callback)
636         (meta . ((class . Item)
637                  (interfaces  . (break-aligned-interface
638                                  custos-interface
639                                  font-interface
640                                  staff-symbol-referencer-interface))))))
642     (DotColumn
643      . (
644         (axes . (,X))
645         (direction . ,RIGHT)
646         (positioning-done . ,ly:dot-column::calc-positioning-done)
647         (X-extent . ,ly:axis-group-interface::width)
648         (meta . ((class . Item)
649                  (interfaces . (axis-group-interface
650                                 dot-column-interface))))))
652     (Dots
653      . (
654         (dot-count . ,dots::calc-dot-count)
655         (staff-position . ,dots::calc-staff-position)
656         (stencil . ,ly:dots::print)
657         (extra-spacing-height . (-0.5 . 0.5))
658         (meta . ((class . Item)
659                  (interfaces . (dots-interface
660                                 font-interface
661                                 staff-symbol-referencer-interface))))))
663     (DoublePercentRepeat
664      . (
665         (break-align-symbol . staff-bar)
666         (break-visibility . ,begin-of-line-invisible)
667         (dot-negative-kern . 0.75)
668         (font-encoding . fetaMusic)
669         (non-musical . #t)
670         (slash-negative-kern . 1.6)
671         (slope . 1.0)
672         (stencil . ,ly:percent-repeat-item-interface::double-percent)
673         (thickness . 0.48)
674         (meta . ((class . Item)
675                  (interfaces . (break-aligned-interface
676                                 font-interface
677                                 percent-repeat-interface
678                                 percent-repeat-item-interface))))))
680     (DoublePercentRepeatCounter
681      . (
682         (direction . ,UP)
683         (font-encoding . fetaText)
684         (font-size . -2)
685         (padding . 0.2)
686         (self-alignment-X . ,CENTER)
687         (side-axis . ,Y)
688         (staff-padding . 0.25)
689         (stencil . ,ly:text-interface::print)
690         (X-offset . ,(ly:make-simple-closure
691                       `(,+
692                         ,(ly:make-simple-closure
693                           (list ly:self-alignment-interface::centered-on-y-parent))
694                         ,(ly:make-simple-closure
695                           (list ly:self-alignment-interface::x-aligned-on-self)))))
696         (Y-offset . ,ly:side-position-interface::y-aligned-side)
697         (meta . ((class . Item)
698                  (interfaces . (font-interface
699                                 percent-repeat-interface
700                                 percent-repeat-item-interface
701                                 self-alignment-interface
702                                 side-position-interface
703                                 text-interface))))))
705     (DoubleRepeatSlash
706      . (
707         (dot-negative-kern . 0.75)
708         (font-encoding . fetaMusic)
709         (slash-negative-kern . 1.6)
710         (slope . 1.0)
711         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
712         (thickness . 0.48)
713         (meta . ((class . Item)
714                  (interfaces . (font-interface
715                                 percent-repeat-interface
716                                 percent-repeat-item-interface
717                                 rhythmic-grob-interface))))))
719     (DynamicLineSpanner
720      . (
721         (axes . (,Y))
722         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
723         (direction . ,DOWN)
724         (minimum-space . 1.2)
725         (outside-staff-priority . 250)
726         (padding . 0.6)
727         (side-axis . ,Y)
728         (slur-padding . 0.3)
729         (staff-padding . 0.1)
730         (X-extent . ,ly:axis-group-interface::width)
731         (Y-extent . ,ly:axis-group-interface::height)
732         (Y-offset . ,ly:side-position-interface::y-aligned-side)
733         (meta . ((class . Spanner)
734                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
735                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
736                  (interfaces . (axis-group-interface
737                                 dynamic-interface
738                                 dynamic-line-spanner-interface
739                                 side-position-interface))))))
741     (DynamicText
742      . (
744         ;; todo.
746         (direction . ,ly:script-interface::calc-direction)
747         (extra-spacing-width . (+inf.0 . -inf.0))
748         (font-encoding . fetaText)
749         (font-series . bold)
750         (font-shape . italic)
751         (outside-staff-priority . 250)
752         (positioning-done . ,ly:script-interface::calc-positioning-done)
753         (right-padding . 0.5)
754         (self-alignment-X . ,CENTER)
755         (self-alignment-Y . ,CENTER)
756         (stencil . ,ly:text-interface::print)
757         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
758         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
759         (meta . ((class . Item)
760                  (interfaces . (dynamic-interface
761                                 dynamic-text-interface
762                                 font-interface
763                                 script-interface
764                                 self-alignment-interface
765                                 text-interface))))))
767     (DynamicTextSpanner
768      . (
769         (before-line-breaking . ,dynamic-text-spanner::before-line-breaking)
770         (bound-details . ((right . ((attach-dir .  ,LEFT)
771                                     (Y . 0)
772                                     (padding . 0.75)
773                                     ))
774                           (right-broken . ((attach-dir .  ,RIGHT)
775                                     (padding . 0.0)
776                                     ))
778                           (left . ((attach-dir .  ,LEFT)
779                                    (Y . 0)
780                                    (stencil-offset . (-0.75 . -0.5))
781                                    (padding . 0.75)
782                                    ))
783                           (left-broken . ((attach-dir .  ,RIGHT)
784                                    ))
785                           ))
786         (dash-fraction . 0.2)
787         (dash-period . 3.0)
789         ;; rather ugh with NCSB
790         ;; (font-series . bold)
791         (font-shape . italic)
793         ;; need to blend with dynamic texts.
794         (font-size . 1)
796         (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text)
798         ;; make sure the spanner doesn't get too close to notes
799         (minimum-Y-extent . (-1 . 1))
801         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
802         (stencil . ,ly:line-spanner::print)
803         (style . dashed-line)
804         (meta . ((class . Spanner)
805                  (interfaces . (dynamic-interface
806                                 dynamic-text-spanner-interface
807                                 font-interface
808                                 line-interface
809                                 line-spanner-interface
810                                 spanner-interface
811                                 text-interface))))))
814     (Episema
815      . (
816         (bound-details . ((left . ((Y . 0)
817                                    (padding . 0)
818                                    (attach-dir . ,LEFT)
819                                    ))
820                           (right . ((Y . 0)
821                                     (padding . 0)
822                                     (attach-dir . ,RIGHT)
823                                     ))
824                           ))
825         (direction . ,UP)
826         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
827         (quantize-position . #t)
828         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
829         (side-axis . ,Y)
830         (stencil . ,ly:line-spanner::print)
831         (style . line)
832         (Y-offset . ,ly:side-position-interface::y-aligned-side)
833         (meta . ((class . Spanner)
834                  (interfaces . (episema-interface
835                                 font-interface
836                                 line-interface
837                                 line-spanner-interface
838                                 side-position-interface))))))
841     (Fingering
842      . (
844         ;; sync with TextScript (?)
846         (avoid-slur . around)
847         (cross-staff . ,ly:side-position-interface::calc-cross-staff)
848         (direction . ,ly:script-interface::calc-direction)
849         (font-encoding . fetaText)
850         (font-size . -5)                ; don't overlap when next to heads.
851         (padding . 0.5)
852         (positioning-done . ,ly:script-interface::calc-positioning-done)
853         (script-priority . 100)
854         (self-alignment-X . ,CENTER)
855         (self-alignment-Y . ,CENTER)
856         (slur-padding . 0.2)
857         (staff-padding . 0.5)
858         (stencil . ,ly:text-interface::print)
859         (text . ,fingering::calc-text)
860         (meta . ((class . Item)
861                  (interfaces . (finger-interface
862                                 font-interface
863                                 self-alignment-interface
864                                 side-position-interface
865                                 text-interface
866                                 text-script-interface))))))
868     (FootnoteItem
869      . (
870         (annotation-balloon . #f)
871         (annotation-line . #t)
872         (break-visibility . ,inherit-y-parent-visibility)
873         (footnote-text . ,(grob::calc-property-by-copy 'footnote-text))
874         (stencil . ,ly:balloon-interface::print)
875         (text . ,(grob::calc-property-by-copy 'text))
876         (Y-extent . #f)
877         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
878         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
879         (meta . ((class . Item)
880                  (interfaces . (balloon-interface
881                                 footnote-interface
882                                 font-interface
883                                 text-interface))))))
885     (FootnoteSpanner
886      . (
887         (annotation-balloon . #f)
888         (annotation-line . #t)
889         (footnote-text . ,(grob::calc-property-by-copy 'footnote-text))
890         (spanner-placement . LEFT)
891         (stencil . ,ly:balloon-interface::print-spanner)
892         (text . ,(grob::calc-property-by-copy 'text))
893         (Y-extent . #f)
894         (X-offset . ,(grob::calc-property-by-copy 'X-offset))
895         (Y-offset . ,(grob::calc-property-by-copy 'Y-offset))
896         (meta . ((class . Spanner)
897                  (interfaces . (balloon-interface
898                                 footnote-interface
899                                 footnote-spanner-interface
900                                 font-interface
901                                 text-interface))))))
903     (FretBoard
904      . (
905         (after-line-breaking . ,ly:chord-name::after-line-breaking)
906         (fret-diagram-details . ((finger-code . below-string)))
907         (stencil . ,fret-board::calc-stencil)
908         (extra-spacing-height . (0.2 . -0.2))
909         (meta . ((class . Item)
910                  (interfaces . (chord-name-interface
911                                 font-interface
912                                 fret-diagram-interface
913                                 rhythmic-grob-interface))))))
916     (Glissando
917      . (
918         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
919         (bound-details . ((right . ((attach-dir .  ,CENTER)
920                                     (padding . 1.5)
921                                       ))
922                           (left . ((attach-dir .  ,CENTER)
923                                    (padding . 1.5)
924                                       ))
925                           ))
926         (gap . 0.5)
927         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
928         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
929         (stencil . ,ly:line-spanner::print)
930         (style . line)
931         (X-extent . #f)
932         (Y-extent . #f)
933         (zigzag-width . 0.75)
934         (meta . ((class . Spanner)
935                  (interfaces . (glissando-interface
936                                 line-interface
937                                 line-spanner-interface
938                                 unbreakable-spanner-interface))))))
940     (GraceSpacing
941      . (
942         (common-shortest-duration . ,grace-spacing::calc-shortest-duration)
943         (shortest-duration-space . 1.6)
944         (spacing-increment . 0.8)
945         (meta . ((class . Spanner)
946                  (interfaces . (grace-spacing-interface
947                                 spacing-options-interface
948                                 spanner-interface))))))
950     (GridLine
951      . (
952         (layer . 0)
953         (self-alignment-X . ,CENTER)
954         (stencil . ,ly:grid-line-interface::print)
955         (X-extent  . ,ly:grid-line-interface::width)
956         (X-offset . ,(ly:make-simple-closure
957                       `(,+
958                         ,(ly:make-simple-closure
959                           (list ly:self-alignment-interface::centered-on-x-parent))
960                         ,(ly:make-simple-closure
961                           (list ly:self-alignment-interface::x-aligned-on-self)))))
962         (meta . ((class . Item)
963                  (interfaces . (grid-line-interface
964                                 self-alignment-interface))))))
966     (GridPoint
967      . (
968         (X-extent . (0 . 0))
969         (Y-extent . (0 . 0))
970         (meta . ((class . Item)
971                  (interfaces . (grid-point-interface))))))
974     (Hairpin
975      . (
976         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
977         (bound-padding . 1.0)
978         (circled-tip . #f)
979         (grow-direction . ,hairpin::calc-grow-direction)
980         (height . 0.6666)
981         (minimum-length . 2.0)
982         (self-alignment-Y . ,CENTER)
983         (springs-and-rods . ,ly:spanner::set-spacing-rods)
984         (stencil . ,ly:hairpin::print)
985         (thickness . 1.0)
986         (to-barline . #t)
987         (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self)
988         (meta . ((class . Spanner)
989                  (interfaces . (dynamic-interface
990                                 hairpin-interface
991                                 line-interface
992                                 self-alignment-interface
993                                 spanner-interface))))))
995     (HorizontalBracket
996      . (
997         (bracket-flare . (0.5 . 0.5))
998         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
999         (direction . ,DOWN)
1000         (padding . 0.2)
1001         (side-axis . ,Y)
1002         (staff-padding . 0.2)
1003         (stencil . ,ly:horizontal-bracket::print)
1004         (thickness . 1.0)
1005         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1006         (meta . ((class . Spanner)
1007                  (interfaces . (horizontal-bracket-interface
1008                                 line-interface
1009                                 side-position-interface
1010                                 spanner-interface))))))
1013     (InstrumentName
1014      . (
1015         (direction . ,LEFT)
1016         (padding . 0.3)
1017         (self-alignment-X . ,CENTER)
1018         (self-alignment-Y . ,CENTER)
1019         (stencil . ,system-start-text::print)
1020         (X-offset . ,system-start-text::calc-x-offset)
1021         (Y-offset . ,system-start-text::calc-y-offset)
1022         (meta . ((class . Spanner)
1023                  (interfaces . (font-interface
1024                                 self-alignment-interface
1025                                 side-position-interface
1026                                 system-start-text-interface))))))
1028     (InstrumentSwitch
1029      . (
1030         (direction . ,UP)
1031         (extra-spacing-width . (+inf.0 . -inf.0))
1032         (outside-staff-priority . 500)
1033         (padding . 0.5)
1034         (self-alignment-X . ,LEFT)
1035         (side-axis . ,Y)
1036         (staff-padding . 0.5)
1037         (stencil . ,ly:text-interface::print)
1038         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1039         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1040         (meta . ((class . Item)
1041                  (interfaces . (font-interface
1042                                 self-alignment-interface
1043                                 side-position-interface
1044                                 text-interface))))))
1047     (KeyCancellation
1048      . (
1049         (break-align-symbol . key-cancellation)
1050         (break-visibility . ,begin-of-line-invisible)
1051         (glyph-name-alist . ,cancellation-glyph-name-alist)
1052         (non-musical . #t)
1053         (space-alist . (
1054                         (time-signature . (extra-space . 1.25))
1055                         (staff-bar . (extra-space . 0.6))
1056                         (key-signature . (extra-space . 0.5))
1057                         (cue-clef . (extra-space . 0.5))
1058                         (right-edge . (extra-space . 0.5))
1059                         (first-note . (fixed-space . 2.5))))
1060         (stencil . ,ly:key-signature-interface::print)
1061         (extra-spacing-width . (0.0 . 0.5))
1062         (Y-offset . ,ly:staff-symbol-referencer::callback)
1063         (meta . ((class . Item)
1064                  (interfaces . (break-aligned-interface
1065                                 font-interface
1066                                 key-cancellation-interface
1067                                 key-signature-interface
1068                                 staff-symbol-referencer-interface))))))
1070     (KeySignature
1071      . (
1072         (avoid-slur . inside)
1073         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1074         (break-align-symbol . key-signature)
1075         (break-visibility . ,begin-of-line-visible)
1076         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
1077         (non-musical . #t)
1078         (space-alist . (
1079                         (time-signature . (extra-space . 1.15))
1080                         (staff-bar . (extra-space . 1.1))
1081                         (cue-clef . (extra-space . 0.5))
1082                         (right-edge . (extra-space . 0.5))
1083                         (first-note . (fixed-space . 2.5))))
1084         (stencil . ,ly:key-signature-interface::print)
1085         (extra-spacing-width . (0.0 . 0.5))
1086         (Y-offset . ,ly:staff-symbol-referencer::callback)
1087         (meta . ((class . Item)
1088                  (interfaces . (break-aligned-interface
1089                                 font-interface
1090                                 key-signature-interface
1091                                 staff-symbol-referencer-interface))))))
1094    (LaissezVibrerTie
1095      . (
1096         (control-points . ,ly:semi-tie::calc-control-points)
1097         (details . ((ratio . 0.333)
1098                     (height-limit . 1.0)))
1099         (direction . ,ly:tie::calc-direction)
1100         (head-direction . ,LEFT)
1101         (stencil  . ,laissez-vibrer::print)
1102         (thickness . 1.0)
1103         (extra-spacing-height . (-0.5 . 0.5))
1104         (meta . ((class . Item)
1105                  (interfaces . (semi-tie-interface))))))
1107     (LaissezVibrerTieColumn
1108      . (
1109         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1110         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1111         (X-extent . #f)
1112         (Y-extent . #f)
1113         (meta . ((class . Item)
1114                  (interfaces . (semi-tie-column-interface))))))
1116     (LedgerLineSpanner
1117      . (
1118         (layer . 0)
1119         (length-fraction . 0.25)
1120         (minimum-length-fraction . 0.25)
1121         (springs-and-rods . ,ly:ledger-line-spanner::set-spacing-rods)
1122         (stencil . ,ly:ledger-line-spanner::print)
1123         (X-extent . #f)
1124         (Y-extent . #f)
1125         (meta . ((class . Spanner)
1126                  (interfaces . (ledger-line-spanner-interface))))))
1128     (LeftEdge
1129      . (
1130         (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
1131         (break-align-symbol . left-edge)
1132         (break-visibility . ,center-invisible)
1133         (non-musical . #t)
1134         (extra-spacing-height . (+inf.0 . -inf.0))
1135         (space-alist . (
1136                         (ambitus . (extra-space . 2.0))
1137                         (breathing-sign . (minimum-space . 0.0))
1138                         (cue-end-clef . (extra-space . 0.8))
1139                         (clef . (extra-space . 0.8))
1140                         (cue-clef . (extra-space . 0.8))
1141                         (staff-bar . (extra-space . 0.0))
1142                         (key-cancellation . (extra-space . 0.0))
1143                         (key-signature . (extra-space . 0.8))
1144                         (time-signature . (extra-space . 1.0))
1145                         (custos . (extra-space . 0.0))
1146                         (first-note . (fixed-space . 2.0))
1147                         (right-edge . (extra-space . 0.0))
1148                         ))
1149         (X-extent . (0 . 0))
1150         (meta . ((class . Item)
1151                  (interfaces . (break-aligned-interface))))))
1153     (LigatureBracket
1154      . (
1155         ;; ugh.  A ligature bracket is totally different from
1156         ;; a tuplet bracket.
1158         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
1159         (control-points . ,ly:tuplet-bracket::calc-control-points)
1160         (direction . ,UP)
1161         (edge-height . (0.7 . 0.7))
1162         (padding . 2.0)
1163         (positions . ,ly:tuplet-bracket::calc-positions)
1164         (shorten-pair . (-0.2 . -0.2))
1165         (staff-padding . 0.25)
1166         (stencil . ,ly:tuplet-bracket::print)
1167         (thickness . 1.6)
1168         (meta . ((class . Spanner)
1169                  (interfaces . (line-interface
1170                                 tuplet-bracket-interface))))))
1172     (LyricExtender
1173      . (
1174         (minimum-length . 1.5)
1175         (stencil . ,ly:lyric-extender::print)
1176         (thickness . 0.8) ; line-thickness
1177         (Y-extent . (0 . 0))
1178         (meta . ((class . Spanner)
1179                  (interfaces . (lyric-extender-interface
1180                                 lyric-interface))))))
1182     (LyricHyphen
1183      . (
1184         (dash-period . 10.0)
1185         (height . 0.42)
1186         (length . 0.66)
1187         (minimum-distance . 0.1)
1188         (minimum-length . 0.3)
1189         (padding . 0.07)
1190         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1191         (stencil . ,ly:lyric-hyphen::print)
1192         (thickness . 1.3)
1193         (Y-extent . (0 . 0))
1194         (meta . ((class . Spanner)
1195                  (interfaces . (font-interface
1196                                 lyric-hyphen-interface
1197                                 lyric-interface
1198                                 spanner-interface))))))
1200     (LyricSpace
1201      . (
1202         (minimum-distance . 0.45)
1203         (padding . 0.0)
1204         (springs-and-rods . ,ly:lyric-hyphen::set-spacing-rods)
1205         (X-extent . #f)
1206         (Y-extent . #f)
1207         (meta . ((class . Spanner)
1208                  (interfaces . (lyric-hyphen-interface
1209                                 spanner-interface))))))
1211     (LyricText
1212      . (
1213         (extra-spacing-width . (0.0 . 0.0))
1214         ;; Recede in height for purposes of note spacing,
1215         ;; so notes in melismata can be freely spaced above lyrics
1216         (extra-spacing-height . (0.2 . -0.2))
1217         (font-series . medium)
1218         (font-size . 1.0)
1219         (self-alignment-X . ,CENTER)
1220         (stencil . ,lyric-text::print)
1221         (text . ,(grob::calc-property-by-copy 'text))
1222         (word-space . 0.6)
1223         (X-offset . ,ly:self-alignment-interface::aligned-on-x-parent)
1224         (meta . ((class . Item)
1225                  (interfaces . (font-interface
1226                                 lyric-syllable-interface
1227                                 rhythmic-grob-interface
1228                                 self-alignment-interface
1229                                 text-interface))))))
1232     (MeasureGrouping
1233      . (
1234         (direction . ,UP)
1235         (height . 2.0)
1236         (padding . 2)
1237         (side-axis . ,Y)
1238         (staff-padding . 3)
1239         (stencil . ,ly:measure-grouping::print)
1240         (thickness . 1)
1241         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1242         (meta . ((class . Spanner)
1243                  (interfaces . (measure-grouping-interface
1244                                 side-position-interface))))))
1246     (MelodyItem
1247      . (
1248         (neutral-direction . ,DOWN)
1249         (meta . ((class . Item)
1250                  (interfaces . (melody-spanner-interface))))))
1252     (MensuralLigature
1253      . (
1254         (stencil . ,ly:mensural-ligature::print)
1255         (thickness . 1.4)
1256         (meta . ((class . Spanner)
1257                  (interfaces . (font-interface
1258                                 mensural-ligature-interface))))))
1260     (MetronomeMark
1261      . (
1262         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1263         (break-visibility . ,end-of-line-invisible)
1264         (direction . ,UP)
1265         (extra-spacing-width . (+inf.0 . -inf.0))
1266         (outside-staff-priority . 1000)
1267         (padding . 0.8)
1268         (side-axis . ,Y)
1269         (stencil . ,ly:text-interface::print)
1270         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1271         (X-offset . ,(ly:make-simple-closure
1272                       `(,+
1273                         ,(ly:make-simple-closure
1274                           (list ly:break-alignable-interface::self-align-callback))
1275                         ,(ly:make-simple-closure
1276                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1277         (self-alignment-X . ,LEFT)
1278         (break-align-symbols . (time-signature))
1279         (non-break-align-symbols . (multi-measure-rest-interface))
1280         (non-musical . #t)
1281         (meta . ((class . Item)
1282                  (interfaces . (break-alignable-interface
1283                                 font-interface
1284                                 metronome-mark-interface
1285                                 self-alignment-interface
1286                                 side-position-interface
1287                                 text-interface))))))
1289     (MultiMeasureRest
1290      . (
1291         (expand-limit . 10)
1292         (hair-thickness . 2.0)
1293         (padding . 1)
1294         (spacing-pair . (break-alignment . break-alignment))
1295         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1296         (staff-position . 0)
1297         (stencil . ,ly:multi-measure-rest::print)
1298         (thick-thickness . 6.6)
1299         (Y-offset . ,ly:staff-symbol-referencer::callback)
1300         (meta . ((class . Spanner)
1301                  (interfaces . (font-interface
1302                                 multi-measure-interface
1303                                 multi-measure-rest-interface
1304                                 rest-interface
1305                                 staff-symbol-referencer-interface))))))
1307     (MultiMeasureRestNumber
1308      . (
1309         (bound-padding  . 2.0)
1310         (direction . ,UP)
1311         (font-encoding . fetaText)
1312         (padding . 0.4)
1313         (self-alignment-X . ,CENTER)
1314         (side-axis . ,Y)
1315         (springs-and-rods . ,ly:multi-measure-rest::set-text-rods)
1316         (staff-padding . 0.4)
1317         (stencil . ,ly:text-interface::print)
1318         (X-offset . ,(ly:make-simple-closure
1319                       `(,+
1320                         ,(ly:make-simple-closure
1321                           (list ly:self-alignment-interface::x-aligned-on-self))
1322                         ,(ly:make-simple-closure
1323                           (list ly:self-alignment-interface::x-centered-on-y-parent)))))
1324         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1325         (meta . ((class . Spanner)
1326                  (interfaces . (font-interface
1327                                 multi-measure-interface
1328                                 self-alignment-interface
1329                                 side-position-interface
1330                                 text-interface))))))
1332     (MultiMeasureRestText
1333      . (
1334         (direction . ,UP)
1335         (outside-staff-priority . 450)
1336         (padding . 0.2)
1337         (self-alignment-X . ,CENTER)
1338         (staff-padding . 0.25)
1339         (stencil . ,ly:text-interface::print)
1340         (X-offset . ,(ly:make-simple-closure
1341                       `(,+
1342                         ,(ly:make-simple-closure
1343                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1344                         ,(ly:make-simple-closure
1345                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1346         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1347         (meta . ((class . Spanner)
1348                  (interfaces . (font-interface
1349                                 multi-measure-interface
1350                                 self-alignment-interface
1351                                 side-position-interface
1352                                 text-interface))))))
1355     (NonMusicalPaperColumn
1356      . (
1357         (allow-loose-spacing . #t)
1358         (axes . (,X))
1359         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1360         (full-measure-extra-space . 1.0)
1361         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1362         ;; sufficient padding to prevent ledger lines from moving over/under
1363         (skyline-vertical-padding . 0.6)
1364         ;;                    (stencil . ,ly:paper-column::print)
1366         (keep-inside-line . #t)
1367         (line-break-permission . allow)
1368         (non-musical . #t)
1369         (page-break-permission . allow)
1371         ;; debugging stuff: print column number.
1372         ;;               (font-size . -6) (font-name . "sans")  (Y-extent . #f)
1374         (X-extent . ,ly:axis-group-interface::width)
1375         (meta . ((class . Paper_column)
1376                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1377                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1378                  (interfaces . (axis-group-interface
1379                                 font-interface
1380                                 paper-column-interface
1381                                 separation-item-interface
1382                                 spaceable-grob-interface))))))
1384     (NoteCollision
1385      . (
1386         (axes . (,X ,Y))
1387         (positioning-done . ,ly:note-collision-interface::calc-positioning-done)
1388         (prefer-dotted-right . #t)
1389         (X-extent . ,ly:axis-group-interface::width)
1390         (Y-extent . ,ly:axis-group-interface::height)
1391         (meta . ((class . Item)
1392                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1393                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1394                  (interfaces . (axis-group-interface
1395                                 note-collision-interface))))))
1397     (NoteColumn
1398      . (
1399         (axes . (,X ,Y))
1400         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1401         (skyline-vertical-padding . 0.15)
1402         (X-extent . ,ly:axis-group-interface::width)
1403         (Y-extent . ,ly:axis-group-interface::height)
1404         (meta . ((class . Item)
1405                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1406                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1407                  (interfaces . (axis-group-interface
1408                                 note-column-interface
1409                                 separation-item-interface))))))
1411     (NoteHead
1412      . (
1413         (flexa-width . 2.0)
1414         (duration-log . ,note-head::calc-duration-log)
1415         (extra-spacing-height . ,ly:note-head::include-ledger-line-height)
1416         (glyph-name . ,note-head::calc-glyph-name)
1417         (ligature-flexa . #f)
1418         (stem-attachment . ,ly:note-head::calc-stem-attachment)
1419         (stencil . ,ly:note-head::print)
1420         (X-offset . ,ly:note-head::stem-x-shift)
1421         (Y-offset . ,ly:staff-symbol-referencer::callback)
1422         (meta . ((class . Item)
1423                  (interfaces . (font-interface
1424                                 gregorian-ligature-interface
1425                                 ledgered-interface
1426                                 mensural-ligature-interface
1427                                 note-head-interface
1428                                 rhythmic-grob-interface
1429                                 rhythmic-head-interface
1430                                 staff-symbol-referencer-interface
1431                                 vaticana-ligature-interface))))))
1433     (NoteName
1434      . (
1435         (stencil . ,ly:text-interface::print)
1436         (meta . ((class . Item)
1437                  (interfaces . (font-interface
1438                                 note-name-interface
1439                                 text-interface))))))
1441     (NoteSpacing
1442      . (
1443         ;; Changed this from 0.75.
1444         ;; If you ever change this back, please document! --hwn
1445         (knee-spacing-correction . 1.0)
1446         (same-direction-correction . 0.25)
1447         (space-to-barline . #t)
1448         (stem-spacing-correction . 0.5)
1449         (meta . ((class . Item)
1450                  (interfaces . (note-spacing-interface
1451                                 spacing-interface))))))
1454     (OctavateEight
1455      . (
1456         (break-visibility . ,inherit-x-parent-visibility)
1457         (font-shape . italic)
1458         (font-size . -4)
1459         (self-alignment-X . ,CENTER)
1460         (staff-padding . 0.2)
1461         (stencil . ,ly:text-interface::print)
1462         (X-offset . ,(ly:make-simple-closure
1463                       `(,+
1464                         ,(ly:make-simple-closure
1465                           (list ly:self-alignment-interface::x-aligned-on-self))
1466                         ,(ly:make-simple-closure
1467                           (list ly:self-alignment-interface::centered-on-x-parent)))))
1468         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1469         (meta . ((class . Item)
1470                  (interfaces . (font-interface
1471                                 self-alignment-interface
1472                                 side-position-interface
1473                                 text-interface))))))
1475     (OttavaBracket
1476      . (
1477         (dash-fraction . 0.3)
1478         (direction . ,UP)
1479         (edge-height . (0 . 1.2))
1480         (font-shape . italic)
1481         (minimum-length . 1.0)
1482         (outside-staff-priority . 400)
1483         (padding . 0.5)
1484         (shorten-pair . (0.0 . -0.6))
1485         (staff-padding . 1.0)
1486         (stencil . ,ly:ottava-bracket::print)
1487         (style . dashed-line)
1488         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1489         (meta . ((class . Spanner)
1490                  (interfaces . (font-interface
1491                                 horizontal-bracket-interface
1492                                 line-interface
1493                                 ottava-bracket-interface
1494                                 side-position-interface
1495                                 text-interface))))))
1498     (PaperColumn
1499      . (
1500         (allow-loose-spacing . #t)
1501         (axes . (,X))
1502         (before-line-breaking . ,ly:paper-column::before-line-breaking)
1503         (horizontal-skylines . ,ly:separation-item::calc-skylines)
1504         (keep-inside-line . #t)
1505         ;; (stencil . ,ly:paper-column::print)
1506         (X-extent . ,ly:axis-group-interface::width)
1508         ;; debugging
1509         ;;                       (font-size . -6) (font-name . "sans") (Y-extent . #f)
1510         (meta . ((class . Paper_column)
1511                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1512                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1513                  (interfaces . (axis-group-interface
1514                                 font-interface
1515                                 paper-column-interface
1516                                 separation-item-interface
1517                                 spaceable-grob-interface))))))
1519     (ParenthesesItem
1520      . (
1521         (font-size . -6)
1522         (padding . 0.2)
1523         (stencil . ,parentheses-item::print)
1524         (stencils . ,parentheses-item::calc-parenthesis-stencils)
1525         (meta . ((class . Item)
1526                  (interfaces . (font-interface
1527                                 parentheses-interface))))))
1529     (PercentRepeat
1530      . (
1531         (dot-negative-kern . 0.75)
1532         (font-encoding . fetaMusic)
1533         (slope . 1.0)
1534         (spacing-pair . (break-alignment . staff-bar))
1535         (springs-and-rods . ,ly:multi-measure-rest::set-spacing-rods)
1536         (stencil . ,ly:multi-measure-rest::percent)
1537         (thickness . 0.48)
1538         (meta . ((class . Spanner)
1539                  (interfaces . (font-interface
1540                                 multi-measure-rest-interface
1541                                 percent-repeat-interface))))))
1543     (PercentRepeatCounter
1544      . (
1545         (direction . ,UP)
1546         (font-encoding . fetaText)
1547         (font-size . -2)
1548         (padding . 0.2)
1549         (self-alignment-X . ,CENTER)
1550         (staff-padding . 0.25)
1551         (stencil . ,ly:text-interface::print)
1552         (X-offset . ,(ly:make-simple-closure
1553                       `(,+
1554                         ,(ly:make-simple-closure
1555                           (list ly:self-alignment-interface::x-centered-on-y-parent))
1556                         ,(ly:make-simple-closure
1557                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1558         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1559         (meta . ((class . Spanner)
1560                  (interfaces . (font-interface
1561                                 percent-repeat-interface
1562                                 self-alignment-interface
1563                                 side-position-interface
1564                                 text-interface))))))
1566     (PhrasingSlur
1567      . (
1568         (control-points . ,ly:slur::calc-control-points)
1569         (cross-staff . ,ly:slur::calc-cross-staff)
1570         (details . ,default-slur-details)
1571         (direction . ,ly:slur::calc-direction)
1572         (height-limit . 2.0)
1573         (minimum-length . 1.5)
1574         (ratio . 0.333)
1575         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1576         (stencil . ,ly:slur::print)
1577         (thickness . 1.1)
1578         (Y-extent . ,ly:slur::height)
1579         (meta . ((class . Spanner)
1580                  (interfaces . (slur-interface))))))
1582     ;; an example of a text spanner
1583     (PianoPedalBracket
1584      . (
1585         (bound-padding . 1.0)
1586         (bracket-flare . (0.5 . 0.5))
1587         (direction . ,DOWN)
1588         (edge-height . (1.0 . 1.0))
1589         (shorten-pair . (0.0 . 0.0))
1590         (stencil . ,ly:piano-pedal-bracket::print)
1591         (style . line)
1592         (thickness .  1.0)
1593         (meta . ((class . Spanner)
1594                  (interfaces . (line-interface
1595                                 piano-pedal-bracket-interface
1596                                 piano-pedal-interface))))))
1599     (RehearsalMark
1600      . (
1601         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
1602         (baseline-skip . 2)
1603         (break-align-symbols . (staff-bar clef))
1604         (break-visibility . ,end-of-line-invisible)
1605         (direction . ,UP)
1606         (extra-spacing-width . (+inf.0 . -inf.0))
1607         (font-size . 2)
1608         (non-musical . #t)
1609         (outside-staff-priority . 1500)
1610         (padding . 0.8)
1611         (self-alignment-X . ,CENTER)
1612         (stencil . ,ly:text-interface::print)
1613         (X-offset . ,(ly:make-simple-closure
1614                       `(,+
1615                         ,(ly:make-simple-closure
1616                           (list ly:break-alignable-interface::self-align-callback))
1617                         ,(ly:make-simple-closure
1618                           (list ly:self-alignment-interface::x-aligned-on-self)))))
1619         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1620         (meta . ((class . Item)
1621                  (interfaces . (break-alignable-interface
1622                                 font-interface
1623                                 mark-interface
1624                                 self-alignment-interface
1625                                 side-position-interface
1626                                 text-interface))))))
1628     (RepeatSlash
1629      . (
1630         (slash-negative-kern . 0.85)
1631         (slope . 1.7)
1632         (stencil . ,ly:percent-repeat-item-interface::beat-slash)
1633         (thickness . 0.48)
1634         (meta . ((class . Item)
1635                  (interfaces . (percent-repeat-interface
1636                                 percent-repeat-item-interface
1637                                 rhythmic-grob-interface))))))
1639     (RepeatTie
1640      . (
1641         (control-points . ,ly:semi-tie::calc-control-points)
1642         (details . ((ratio . 0.333)
1643                     (height-limit . 1.0)))
1644         (direction . ,ly:tie::calc-direction)
1645         (head-direction . ,RIGHT)
1646         (stencil  . ,ly:tie::print)
1647         (thickness . 1.0)
1648         (extra-spacing-height . (-0.5 . 0.5))
1649         (meta . ((class . Item)
1650                  (interfaces . (semi-tie-interface))))))
1652     (RepeatTieColumn
1653      . (
1654         (direction . ,ly:tie::calc-direction)
1655         (head-direction . ,ly:semi-tie-column::calc-head-direction)
1656         (positioning-done . ,ly:semi-tie-column::calc-positioning-done)
1657         (X-extent . #f)
1658         (Y-extent . #f)
1659         (meta . ((class . Item)
1660                  (interfaces . (semi-tie-column-interface))))))
1662     (Rest
1663      . (
1664         (cross-staff . ,ly:rest::calc-cross-staff)
1665         (duration-log . ,stem::calc-duration-log)
1666         (minimum-distance . 0.25)
1667         (stencil . ,ly:rest::print)
1668         (X-extent . ,ly:rest::width)
1669         (Y-extent . ,ly:rest::height)
1670         (Y-offset . ,ly:rest::y-offset-callback)
1671         (meta . ((class . Item)
1672                  (interfaces . (font-interface
1673                                 rest-interface
1674                                 rhythmic-grob-interface
1675                                 rhythmic-head-interface
1676                                 staff-symbol-referencer-interface))))))
1678     (RestCollision
1679      . (
1680         (minimum-distance . 0.75)
1681         (positioning-done . ,ly:rest-collision::calc-positioning-done)
1682         (meta . ((class . Item)
1683                  (interfaces . (rest-collision-interface))))))
1686     (Script
1687      . (
1688         (add-stem-support . #t)
1689         (cross-staff . ,ly:script-interface::calc-cross-staff)
1690         (direction . ,ly:script-interface::calc-direction)
1691         (font-encoding . fetaMusic)
1692         (positioning-done . ,ly:script-interface::calc-positioning-done)
1693         (side-axis . ,Y)
1695         ;; padding set in script definitions.
1696         (staff-padding . 0.25)
1698         (stencil . ,ly:script-interface::print)
1699         (X-offset . ,script-interface::calc-x-offset)
1700         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1701         (meta . ((class . Item)
1702                  (interfaces . (font-interface
1703                                 script-interface
1704                                 side-position-interface))))))
1706     (ScriptColumn
1707      . (
1708         (before-line-breaking . ,ly:script-column::before-line-breaking)
1709         (meta . ((class . Item)
1710                  (interfaces . (script-column-interface))))))
1712     (ScriptRow
1713      . (
1714         (before-line-breaking . ,ly:script-column::row-before-line-breaking)
1715         (meta . ((class . Item)
1716                  (interfaces . (script-column-interface))))))
1718     (Slur
1719      . (
1720         (avoid-slur . inside)
1721         (control-points . ,ly:slur::calc-control-points)
1722         (cross-staff . ,ly:slur::calc-cross-staff)
1723         (details . ,default-slur-details)
1724         (direction . ,ly:slur::calc-direction)
1725         (height-limit . 2.0)
1726         (line-thickness . 0.8)
1727         (minimum-length . 1.5)
1728         (ratio . 0.25)
1729         (springs-and-rods . ,ly:spanner::set-spacing-rods)
1730         (stencil . ,ly:slur::print)
1731         (thickness . 1.2)
1732         (Y-extent . ,ly:slur::height)
1733         (meta . ((class . Spanner)
1734                  (interfaces . (slur-interface))))))
1736     (SostenutoPedal
1737      . (
1738         (direction . ,RIGHT)
1739         (extra-spacing-width . (+inf.0 . -inf.0))
1740         (font-shape . italic)
1741         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1742         (self-alignment-X . ,CENTER)
1743         (stencil . ,ly:text-interface::print)
1744         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1745         (meta . ((class . Item)
1746                  (interfaces . (font-interface
1747                                 piano-pedal-script-interface
1748                                 self-alignment-interface
1749                                 text-interface))))))
1751     (SostenutoPedalLineSpanner
1752      . (
1753         (axes . (,Y))
1754         (direction . ,DOWN)
1755         (minimum-space . 1.0)
1756         (outside-staff-priority . 1000)
1757         (padding . 1.2)
1758         (side-axis . ,Y)
1759         (staff-padding . 1.0)
1760         (X-extent . ,ly:axis-group-interface::width)
1761         (Y-extent . ,ly:axis-group-interface::height)
1762         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1763         (meta . ((class . Spanner)
1764                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1765                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1766                  (interfaces . (axis-group-interface
1767                                 piano-pedal-interface
1768                                 side-position-interface))))))
1770     (SpacingSpanner
1771      . (
1772         (average-spacing-wishes . #t)
1773         (base-shortest-duration . ,(ly:make-moment 3 16))
1774         (common-shortest-duration . ,ly:spacing-spanner::calc-common-shortest-duration)
1775         (shortest-duration-space . 2.0)
1776         (spacing-increment . 1.2)
1777         (springs-and-rods . ,ly:spacing-spanner::set-springs)
1778         (meta . ((class . Spanner)
1779                  (interfaces . (spacing-options-interface
1780                                 spacing-spanner-interface))))))
1782     (SpanBar
1783      . (
1784         (allow-span-bar . #t)
1785         (bar-extent . ,ly:axis-group-interface::height)
1786         (before-line-breaking . ,ly:span-bar::before-line-breaking)
1787         (break-align-symbol . staff-bar)
1788         (cross-staff . #t)
1789         (glyph-name . ,ly:span-bar::calc-glyph-name)
1791         ;; ugh duplication! (these 4 properties were copied from Barline)
1792         ;;
1793         ;; Ross. page 151 lists other values, we opt for a leaner look
1794         ;;
1795         (kern . 3.0)
1796         (thin-kern . 3.0)
1797         (hair-thickness . 1.6)
1798         (thick-thickness . 6.0)
1800         (layer . 0)
1801         (non-musical . #t)
1802         (stencil . ,ly:span-bar::print)
1803         (X-extent . ,ly:span-bar::width)
1804         (Y-extent . ,ly:axis-group-interface::height)
1805         (meta . ((class . Item)
1806                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1807                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1808                  (interfaces . (bar-line-interface
1809                                 font-interface
1810                                 span-bar-interface))))))
1812     (StaffGrouper
1813      . (
1814         (staff-staff-spacing . ((basic-distance . 9)
1815                                 (minimum-distance . 7)
1816                                 (padding . 1)
1817                                 (stretchability . 5)))
1818         (staffgroup-staff-spacing . ((basic-distance . 10.5)
1819                                      (minimum-distance . 8)
1820                                      (padding . 1)
1821                                      (stretchability . 9)))
1822         (meta . ((class . Spanner)
1823                  (interfaces . (staff-grouper-interface))))))
1825     (StaffSpacing
1826      . (
1827         (non-musical . #t)
1828         (stem-spacing-correction . 0.4)
1829         (meta . ((class . Item)
1830                  (interfaces . (spacing-interface
1831                                 staff-spacing-interface))))))
1833     (StaffSymbol
1834      . (
1835         (layer . 0)
1836         (ledger-line-thickness . (1.0 . 0.1))
1837         (line-count . 5)
1838         (stencil . ,ly:staff-symbol::print)
1839         (Y-extent . ,ly:staff-symbol::height)
1840         (meta . ((class . Spanner)
1841                  (interfaces . (staff-symbol-interface))))))
1843     (StanzaNumber
1844      . (
1845         (direction . ,LEFT)
1846         (font-series . bold)
1847         (padding . 1.0)
1848         (side-axis . ,X)
1849         (stencil . ,ly:text-interface::print)
1850         (X-offset . ,ly:side-position-interface::x-aligned-side)
1851         (meta . ((class . Item)
1852                  (interfaces . (font-interface
1853                                 side-position-interface
1854                                 stanza-number-interface
1855                                 text-interface))))))
1857     (Stem
1858      . (
1859         (beamlet-default-length . (1.1 . 1.1))
1860         (beamlet-max-length-proportion . (0.75 . 0.75))
1861         (cross-staff . ,ly:stem::calc-cross-staff)
1862         (default-direction . ,ly:stem::calc-default-direction)
1863         (details
1864          . (
1865             ;; 3.5 (or 3 measured from note head) is standard length
1866             ;; 32nd, 64th, 128th flagged stems should be longer
1867             (lengths . (3.5 3.5 3.5 4.25 5.0 6.0))
1869             ;; FIXME.  3.5 yields too long beams (according to Ross and
1870             ;; looking at Baerenreiter examples) for a number of common
1871             ;; boundary cases.  Subtracting half a beam thickness fixes
1872             ;; this, but the bug may well be somewhere else.
1874             ;; FIXME this should come from 'lengths
1875             (beamed-lengths . (3.26 3.5 3.6))
1877             ;; The 'normal' minima
1878             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1879                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1881             ;; The 'extreme case' minima
1882             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1884             ;; Stems in unnatural (forced) direction should be shortened by
1885             ;; one staff space, according to [Roush & Gourlay].
1886             ;; Flagged stems we shorten only half a staff space.
1887             (stem-shorten . (1.0 0.5))
1889             ))
1891         ;; We use the normal minima as minimum for the ideal lengths,
1892         ;; and the extreme minima as abolute minimum length.
1894         (direction . ,ly:stem::calc-direction)
1895         (duration-log . ,stem::calc-duration-log)
1896         (flag . ,ly:stem::calc-flag)
1897         (length . ,ly:stem::calc-length)
1898         (neutral-direction . ,DOWN)
1899         (positioning-done . ,ly:stem::calc-positioning-done)
1900         (stem-end-position . ,ly:stem::calc-stem-end-position)
1901         (stem-info . ,ly:stem::calc-stem-info)
1902         (stencil . ,ly:stem::print)
1903         (thickness . 1.3)
1904         (X-extent . ,ly:stem::width)
1905         (X-offset . ,ly:stem::offset-callback)
1906         (Y-extent . ,ly:stem::height)
1907         (Y-offset . ,ly:staff-symbol-referencer::callback)
1908         (meta . ((class . Item)
1909                  (interfaces . (font-interface
1910                                 stem-interface))))))
1912     (StemTremolo
1913      . (
1914         (beam-thickness . 0.48) ; staff-space
1915         (beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
1916         (slope . ,ly:stem-tremolo::calc-slope)
1917         (stencil . ,ly:stem-tremolo::print)
1918         (style . ,ly:stem-tremolo::calc-style)
1919         (X-extent . ,ly:stem-tremolo::width)
1920         (Y-extent . ,ly:stem-tremolo::height)
1921         (meta . ((class . Item)
1922                  (interfaces . (stem-tremolo-interface))))))
1924     (StringNumber
1925      . (
1926         (avoid-slur . around)
1927         (font-encoding . fetaText)
1928         (font-size . -5)                ; don't overlap when next to heads.
1929         (padding . 0.5)
1930         (script-priority . 100)
1931         (self-alignment-X . ,CENTER)
1932         (self-alignment-Y . ,CENTER)
1933         (staff-padding . 0.5)
1934         (stencil . ,print-circled-text-callback)
1935         (text . ,string-number::calc-text)
1936         (meta . ((class . Item)
1937                  (interfaces . (font-interface
1938                                 self-alignment-interface
1939                                 side-position-interface
1940                                 string-number-interface
1941                                 text-interface
1942                                 text-script-interface))))))
1944     (StrokeFinger
1945      . (
1946         (digit-names . #("p" "i" "m" "a" "x"))
1947         (font-shape . italic)
1948         (font-size . -4)                ; don't overlap when next to heads.
1949         (padding . 0.5)
1950         (script-priority . 100)
1951         (self-alignment-X . ,CENTER)
1952         (self-alignment-Y . ,CENTER)
1953         (staff-padding . 0.5)
1954         (stencil . ,ly:text-interface::print)
1955         (text . ,stroke-finger::calc-text)
1956         (meta . ((class . Item)
1957                  (interfaces . (font-interface
1958                                 self-alignment-interface
1959                                 side-position-interface
1960                                 stroke-finger-interface
1961                                 text-interface
1962                                 text-script-interface))))))
1964     (SustainPedal
1965      . (
1966         (direction . ,RIGHT)
1967         (extra-spacing-width . (+inf.0 . -inf.0))
1968         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1969         (self-alignment-X . ,CENTER)
1970         (stencil . ,ly:sustain-pedal::print)
1971         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
1972         (meta . ((class . Item)
1973                  (interfaces . (font-interface
1974                                 piano-pedal-interface
1975                                 piano-pedal-script-interface
1976                                 self-alignment-interface
1977                                 text-interface))))))
1979     (SustainPedalLineSpanner
1980      . (
1981         (axes . (,Y))
1982         (direction . ,DOWN)
1983         (minimum-space . 1.0)
1984         (outside-staff-priority . 1000)
1985         (padding . 1.2)
1986         (side-axis . ,Y)
1987         (staff-padding . 1.2)
1988         (X-extent . ,ly:axis-group-interface::width)
1989         (Y-extent . ,ly:axis-group-interface::height)
1990         (Y-offset . ,ly:side-position-interface::y-aligned-side)
1991         (meta . ((class . Spanner)
1992                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
1993                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
1994                  (interfaces . (axis-group-interface
1995                                 piano-pedal-interface
1996                                 side-position-interface))))))
1998     (System
1999      . (
2000         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2001         (axes . (,X ,Y))
2002         (skyline-horizontal-padding . 0.5)
2003         (vertical-skylines . ,ly:axis-group-interface::calc-skylines)
2004         (X-extent . ,ly:axis-group-interface::width)
2005         (Y-extent . ,ly:system::height)
2006         (meta . ((class . System)
2007                  (object-callbacks . ((pure-relevant-grobs . ,ly:system::calc-pure-relevant-grobs)
2008                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2009                  (interfaces . (axis-group-interface
2010                                 system-interface))))))
2012     (SystemStartBar
2013      . (
2014         (collapse-height . 5.0)
2015         (direction . ,LEFT)
2017         ;; ugh--hardcoded.
2018         (padding . -0.1)  ;; bar must cover rounded ending of staff line.
2019         (stencil . ,ly:system-start-delimiter::print)
2020         (style . bar-line)
2021         (thickness . 1.6)
2022         (X-offset . ,ly:side-position-interface::x-aligned-side)
2023         (Y-extent . #f)
2024         (meta . ((class . Spanner)
2025                  (interfaces . (side-position-interface
2026                                 system-start-delimiter-interface))))))
2028     (SystemStartBrace
2029      . (
2030         (collapse-height . 5.0)
2031         (direction . ,LEFT)
2032         (font-encoding . fetaBraces)
2033         (padding . 0.3)
2034         (stencil . ,ly:system-start-delimiter::print)
2035         (style . brace)
2036         (X-offset . ,ly:side-position-interface::x-aligned-side)
2037         (Y-extent . #f)
2038         (meta . ((class . Spanner)
2039                  (interfaces . (font-interface
2040                                 side-position-interface
2041                                 system-start-delimiter-interface))))))
2043     (SystemStartBracket
2044      . (
2045         (collapse-height . 5.0)
2046         (direction . ,LEFT)
2047         (padding . 0.8)
2048         (stencil . ,ly:system-start-delimiter::print)
2049         (style . bracket)
2050         (thickness . 0.45)
2051         (X-offset . ,ly:side-position-interface::x-aligned-side)
2052         (Y-extent . #f)
2053         (meta . ((class . Spanner)
2054                  (interfaces . (font-interface
2055                                 side-position-interface
2056                                 system-start-delimiter-interface))))))
2058     (SystemStartSquare
2059      . (
2060         (direction . ,LEFT)
2061         (stencil . ,ly:system-start-delimiter::print)
2062         (style . line-bracket)
2063         (thickness . 1.0)
2064         (X-offset . ,ly:side-position-interface::x-aligned-side)
2065         (Y-extent . #f)
2066         (meta . ((class . Spanner)
2067                  (interfaces . (font-interface
2068                                 side-position-interface
2069                                 system-start-delimiter-interface))))))
2072     (TabNoteHead
2073      . (
2074         (details . ((cautionary-properties . ((angularity . 0.4)
2075                                               (half-thickness . 0.075)
2076                                               (padding . 0)
2077                                               (procedure . ,parenthesize-stencil)
2078                                               (width . 0.25)))
2079                     (head-offset . 3/5)
2080                     (harmonic-properties . ((angularity . 2)
2081                                             (half-thickness . 0.075)
2082                                             (padding . 0)
2083                                             (procedure . ,parenthesize-stencil)
2084                                             (width . 0.25)))
2085                     (repeat-tied-properties . ((note-head-visible . #t)
2086                                                (parenthesize . #t)))
2087                     (tied-properties . ((break-visibility . ,begin-of-line-visible)
2088                                         (parenthesize . #t)))))
2090         (direction . ,CENTER)
2091         (duration-log . ,note-head::calc-duration-log)
2092         (font-series . bold)
2093         (font-size . -2)
2094         (stem-attachment . (0.0 . 1.35))
2095         (stencil . ,tab-note-head::print)
2096         (whiteout . #t)
2097         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2098         (Y-offset . ,ly:staff-symbol-referencer::callback)
2099         (meta . ((class . Item)
2100                  (interfaces  . (font-interface
2101                                  note-head-interface
2102                                  rhythmic-grob-interface
2103                                  rhythmic-head-interface
2104                                  staff-symbol-referencer-interface
2105                                  tab-note-head-interface
2106                                  text-interface))))))
2108     (TextScript
2109      . (
2110         (avoid-slur . around)
2111         (cross-staff . ,ly:script-interface::calc-cross-staff)
2112         (direction . ,DOWN)
2113         (extra-spacing-width . (+inf.0 . -inf.0))
2114         (outside-staff-priority . 450)
2116         ;; sync with Fingering ?
2117         (padding . 0.5)
2119         (script-priority . 200)
2120         (side-axis . ,Y)
2121         (slur-padding . 0.5)
2122         (staff-padding . 0.5)
2123         (stencil . ,ly:text-interface::print)
2124         ;; todo: add X self alignment?
2125         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2126         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2127         (meta . ((class . Item)
2128                  (interfaces . (font-interface
2129                                 instrument-specific-markup-interface
2130                                 self-alignment-interface
2131                                 side-position-interface
2132                                 text-interface
2133                                 text-script-interface))))))
2135     (TextSpanner
2136      . (
2137         (bound-details . ((left . ((Y . 0)
2138                                    (padding . 0.25)
2139                                    (attach-dir . ,LEFT)
2140                                    ))
2141                           (left-broken . ((end-on-note . #t)))
2142                           (right . ((Y . 0)
2143                                     (padding . 0.25)
2144                                     ))
2145                           ))
2146         (dash-fraction . 0.2)
2147         (dash-period . 3.0)
2148         (direction . ,UP)
2149         (font-shape . italic)
2150         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2151         (outside-staff-priority . 350)
2152         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2153         (side-axis . ,Y)
2154         (staff-padding . 0.8)
2155         (stencil . ,ly:line-spanner::print)
2156         (style . dashed-line)
2157         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2159         (meta . ((class . Spanner)
2160                  (interfaces . (font-interface
2161                                 line-interface
2162                                 line-spanner-interface
2163                                 side-position-interface))))))
2165     (Tie
2166      . (
2167         (avoid-slur . inside)
2168         (control-points . ,ly:tie::calc-control-points)
2169         (details . (
2170                     ;; for a full list, see tie-details.cc
2171                     (ratio . 0.333)
2172                     (center-staff-line-clearance . 0.6)
2173                     (tip-staff-line-clearance . 0.45)
2174                     (note-head-gap . 0.2)
2175                     (stem-gap . 0.35)
2176                     (height-limit . 1.0)
2177                     (horizontal-distance-penalty-factor . 10)
2178                     (same-dir-as-stem-penalty . 8)
2179                     (min-length-penalty-factor . 26)
2180                     (tie-tie-collision-distance . 0.45)
2181                     (tie-tie-collision-penalty . 25.0)
2182                     (intra-space-threshold . 1.25)
2183                     (outer-tie-vertical-distance-symmetry-penalty-factor . 10)
2184                     (outer-tie-length-symmetry-penalty-factor . 10)
2185                     (vertical-distance-penalty-factor . 7)
2186                     (outer-tie-vertical-gap . 0.25)
2187                     (multi-tie-region-size . 3)
2188                     (single-tie-region-size . 4)
2189                     (between-length-limit . 1.0)))
2191         (direction . ,ly:tie::calc-direction)
2192         (font-size . -6)
2193         (line-thickness . 0.8)
2194         (neutral-direction . ,UP)
2195         (springs-and-rods . ,ly:spanner::set-spacing-rods)
2196         (stencil . ,ly:tie::print)
2197         (thickness . 1.2)
2198         (meta . ((class . Spanner)
2199                  (interfaces . (tie-interface))))))
2201     (TieColumn
2202      . (
2203         (before-line-breaking . ,ly:tie-column::before-line-breaking)
2204         (positioning-done . ,ly:tie-column::calc-positioning-done)
2205         (X-extent . #f)
2206         (Y-extent . #f)
2207         (meta . ((class . Spanner)
2208                  (interfaces . (tie-column-interface))))))
2210     (TimeSignature
2211      . (
2212         (avoid-slur . inside)
2213         (break-align-anchor
2214          . ,ly:break-aligned-interface::calc-extent-aligned-anchor)
2215         (break-align-symbol . time-signature)
2216         (break-align-anchor-alignment . ,LEFT)
2217         (break-visibility . ,all-visible)
2218         (extra-spacing-height . (-1.0 . 1.0))
2219         (non-musical . #t)
2220         (space-alist . (
2221                         (cue-clef . (extra-space . 1.5))
2222                         (first-note . (fixed-space . 2.0))
2223                         (right-edge . (extra-space . 0.5))
2224                         (staff-bar . (minimum-space . 2.0))))
2225         (stencil . ,ly:time-signature::print)
2226         (style . C)
2227         (meta . ((class . Item)
2228                  (interfaces . (break-aligned-interface
2229                                 font-interface
2230                                 time-signature-interface))))))
2232     (TrillPitchAccidental
2233      . (
2234         (direction . ,LEFT)
2235         (font-size . -4)
2236         (glyph-name-alist . ,standard-alteration-glyph-name-alist)
2237         (padding . 0.2)
2238         (side-axis . ,X)
2239         (stencil . ,ly:accidental-interface::print)
2240         (X-offset . ,ly:side-position-interface::x-aligned-side)
2241         (Y-extent . ,ly:accidental-interface::height)
2242         (meta . ((class . Item)
2243                  (interfaces . (accidental-interface
2244                                 font-interface
2245                                 side-position-interface
2246                                 trill-pitch-accidental-interface))))))
2248     (TrillPitchGroup
2249      . (
2250         (axes . (,X))
2251         (direction . ,RIGHT)
2252         (font-size . -4)
2253         (padding . 0.3)
2254         (side-axis . ,X)
2255         (stencil . ,parenthesize-elements)
2256         (stencils . ,parentheses-item::calc-parenthesis-stencils)
2257         (X-offset . ,ly:side-position-interface::x-aligned-side)
2258         (meta . ((class . Item)
2259                  (interfaces . (axis-group-interface
2260                                 font-interface
2261                                 note-head-interface
2262                                 parentheses-interface
2263                                 side-position-interface))))))
2265     (TrillPitchHead
2266      . (
2267         (duration-log . 2)
2268         (font-size . -4)
2269         (stencil . ,ly:note-head::print)
2270         (Y-offset . ,ly:staff-symbol-referencer::callback)
2271         (meta . ((class . Item)
2272                  (interfaces . (font-interface
2273                                 ledgered-interface
2274                                 pitched-trill-interface
2275                                 rhythmic-head-interface
2276                                 staff-symbol-referencer-interface))))))
2278     (TrillSpanner
2279      . (
2280         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2281         (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill"))
2282                                    (Y . 0)
2283                                    (stencil-offset . (-0.5 . -1))
2284                                    (padding . 0.5)
2285                                    (attach-dir . ,CENTER)
2286                                    ))
2287                           (left-broken . ((end-on-note . #t)))
2288                           (right . ((Y . 0)))
2289                           ))
2290         (direction . ,UP)
2291         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2292         (outside-staff-priority . 50)
2293         (padding . 0.5)
2294         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2295         (side-axis . ,Y)
2296         (staff-padding . 1.0)
2297         (stencil . ,ly:line-spanner::print)
2298         (style . trill)
2299         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2300         (meta . ((class . Spanner)
2301                  (interfaces . (font-interface
2302                                 line-interface
2303                                 line-spanner-interface
2304                                 side-position-interface
2305                                 trill-spanner-interface))))))
2307     (TupletBracket
2308      . (
2309         (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
2310         (control-points . ,ly:tuplet-bracket::calc-control-points)
2311         (cross-staff . ,ly:tuplet-bracket::calc-cross-staff)
2312         (direction  . ,ly:tuplet-bracket::calc-direction)
2313         (edge-height . (0.7 . 0.7))
2314         (full-length-to-extent . #t)
2315         (padding . 1.1)
2316         (positions . ,ly:tuplet-bracket::calc-positions)
2317         (shorten-pair . (-0.2 . -0.2))
2318         (staff-padding . 0.25)
2319         (stencil . ,ly:tuplet-bracket::print)
2320         (thickness . 1.6)
2322         (meta . ((class . Spanner)
2323                  (interfaces . (line-interface
2324                                 tuplet-bracket-interface))))))
2326     (TupletNumber
2327      . (
2328         (avoid-slur . inside)
2329         (cross-staff . ,ly:tuplet-number::calc-cross-staff)
2330         (font-shape . italic)
2331         (font-size . -2)
2332         (stencil . ,ly:tuplet-number::print)
2333         (text . ,tuplet-number::calc-denominator-text)
2334         (meta . ((class . Spanner)
2335                  (interfaces . (font-interface
2336                                 text-interface
2337                                 tuplet-number-interface))))))
2340     (UnaCordaPedal
2341      . (
2342         (direction . ,RIGHT)
2343         (extra-spacing-width . (+inf.0 . -inf.0))
2344         (font-shape . italic)
2345         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
2346         (self-alignment-X . ,CENTER)
2347         (stencil . ,ly:text-interface::print)
2348         (X-offset . ,ly:self-alignment-interface::x-aligned-on-self)
2349         (meta . ((class . Item)
2350                  (interfaces . (font-interface
2351                                 piano-pedal-script-interface
2352                                 self-alignment-interface
2353                                 text-interface))))))
2355     (UnaCordaPedalLineSpanner
2356      . (
2357         (axes . (,Y))
2358         (direction . ,DOWN)
2359         (minimum-space . 1.0)
2360         (outside-staff-priority . 1000)
2361         (padding . 1.2)
2362         (side-axis . ,Y)
2363         (staff-padding . 1.2)
2364         (X-extent . ,ly:axis-group-interface::width)
2365         (Y-extent . ,ly:axis-group-interface::height)
2366         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2367         (meta . ((class . Spanner)
2368                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2369                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2370                  (interfaces . (axis-group-interface
2371                                 piano-pedal-interface
2372                                 side-position-interface))))))
2375     (VaticanaLigature
2376      . (
2377         (flexa-width . 2.0)
2378         (stencil . ,ly:vaticana-ligature::print)
2379         (thickness . 0.6)
2380         (meta . ((class . Spanner)
2381                  (interfaces . (font-interface
2382                                 vaticana-ligature-interface))))))
2384     (VerticalAlignment
2385      . (
2386         (axes . (,Y))
2387         (positioning-done . ,ly:align-interface::align-to-ideal-distances)
2388         (stacking-dir . -1)
2389         (vertical-skylines . ,ly:axis-group-interface::combine-skylines)
2390         (X-extent . ,ly:axis-group-interface::width)
2391         (Y-extent . ,ly:axis-group-interface::height)
2392         (meta . ((class . Spanner)
2393                  (object-callbacks . ((Y-common . ,ly:axis-group-interface::calc-y-common)
2394                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)
2395                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)))
2396                  (interfaces . (align-interface
2397                                 axis-group-interface))))))
2399     (VerticalAxisGroup
2400      . (
2401         (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
2402         (axes . (,Y))
2403         (default-staff-staff-spacing . ((basic-distance . 9)
2404                                         (minimum-distance . 8)
2405                                         (padding . 1)))
2406         (nonstaff-unrelatedstaff-spacing . ((padding . 0.5)))
2407         (staff-staff-spacing . ,ly:axis-group-interface::calc-staff-staff-spacing)
2408         (stencil . ,ly:axis-group-interface::print)
2409         (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines)
2410         (X-extent . ,ly:axis-group-interface::width)
2411         (Y-extent . ,ly:hara-kiri-group-spanner::y-extent)
2412         (Y-offset . ,ly:hara-kiri-group-spanner::force-hara-kiri-callback)
2413         (meta . ((class . Spanner)
2414                  (object-callbacks . (
2415                                       (X-common . ,ly:axis-group-interface::calc-x-common)
2416                                       (pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2417                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2419                  (interfaces . (axis-group-interface
2420                                 hara-kiri-group-spanner-interface))))))
2422     (VoiceFollower
2423      . (
2424         (after-line-breaking . ,ly:spanner::kill-zero-spanned-time)
2425         (bound-details . ((right . ((attach-dir .  ,CENTER)
2426                                     (padding . 1.5)
2427                                       ))
2428                           (left . ((attach-dir .  ,CENTER)
2429                                    (padding . 1.5)
2430                                       ))
2431                           ))
2432         (gap . 0.5)
2433         (left-bound-info . ,ly:line-spanner::calc-left-bound-info)
2434         (non-musical . #t)
2435         (right-bound-info . ,ly:line-spanner::calc-right-bound-info)
2436         (stencil . ,ly:line-spanner::print)
2437         (style . line)
2438         (X-extent . #f)
2439         (Y-extent . #f)
2440         (meta . ((class . Spanner)
2441                  (interfaces . (line-interface
2442                                 line-spanner-interface))))))
2444     (VoltaBracket
2445      . (
2446         (direction . ,UP)
2447         (edge-height . (2.0 . 2.0)) ;; staff-space;
2448         (font-encoding . fetaText)
2449         (font-size . -4)
2450         (stencil . ,ly:volta-bracket-interface::print)
2451         (thickness . 1.6) ;; line-thickness
2452         (word-space . 0.6)
2453         (meta . ((class . Spanner)
2454                  (interfaces . (font-interface
2455                                 horizontal-bracket-interface
2456                                 line-interface
2457                                 side-position-interface
2458                                 text-interface
2459                                 volta-bracket-interface
2460                                 volta-interface))))))
2462     (VoltaBracketSpanner
2463      . (
2464         (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff)
2465         (axes . (,Y))
2466         (direction . ,UP)
2467         (no-alignment . #t)
2468         (outside-staff-priority . 600)
2469         (padding . 1)
2470         (side-axis . ,Y)
2471         (X-extent . ,ly:axis-group-interface::width)
2472         (Y-extent . ,ly:axis-group-interface::height)
2473         (Y-offset . ,ly:side-position-interface::y-aligned-side)
2474         (meta . ((class . Spanner)
2475                  (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common)
2476                                       (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs)))
2477                  (interfaces . (axis-group-interface
2478                                 side-position-interface
2479                                 volta-interface))))))
2483 (define (completize-grob-entry x)
2484   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
2486   ;;  (display (car x))
2487   ;;  (newline)
2488   (let* ((name-sym  (car x))
2489          (grob-entry (cdr x))
2490          (meta-entry (assoc-get 'meta grob-entry))
2491          (class (assoc-get 'class meta-entry))
2492          (ifaces-entry
2493           (assoc-get 'interfaces meta-entry)))
2495     (cond
2496      ((eq? 'Item class)
2497       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
2498      ((eq? 'Spanner class)
2499       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
2500      ((eq? 'Paper_column class)
2501       (set! ifaces-entry (cons 'item-interface
2502                                (cons 'paper-column-interface ifaces-entry))))
2503      ((eq? 'System class)
2504       (set! ifaces-entry (cons 'system-interface
2505                                (cons 'spanner-interface ifaces-entry))))
2506      (else
2507       (ly:warning "Unknown class ~a" class)))
2509     (set! ifaces-entry (uniq-list (sort ifaces-entry symbol<?)))
2510     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
2512     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
2513     (set! meta-entry (assoc-set! meta-entry 'interfaces
2514                                  ifaces-entry))
2515     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
2516     (cons name-sym grob-entry)))
2518 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
2520 ;;  (display (map pair? all-grob-descriptions))
2522 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
2524 (map (lambda (x)
2525        ;; (display (car x)) (newline)
2527        (set-object-property! (car x) 'translation-type? list?)
2528        (set-object-property! (car x) 'is-grob? #t))
2529      all-grob-descriptions)
2531 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
2533 (define (volta-bracket-interface::pure-height grob start end)
2534   (let ((edge-height (ly:grob-property grob 'edge-height)))
2535     (if (number-pair? edge-height)
2536         (let ((smaller (min (car edge-height) (cdr edge-height)))
2537               (larger (max (car edge-height) (cdr edge-height))))
2538           (interval-union '(0 . 0) (cons smaller larger)))
2539         '(0 . 0))))
2541 (define pure-print-callbacks
2542   (list
2543    fret-board::calc-stencil
2544    note-head::brew-ez-stencil
2545    print-circled-text-callback
2546    laissez-vibrer::print
2547    lyric-text::print
2548    ly:bar-line::print
2549    ly:mensural-ligature::brew-ligature-primitive
2550    ly:note-head::print
2551    ly:dots::print
2552    ly:clef::print
2553    ly:key-signature-interface::print
2554    ly:percent-repeat-item-interface::beat-slash
2555    ly:text-interface::print
2556    ly:script-interface::print
2557    ly:sustain-pedal::print))
2559 ;; Sometimes we have grobs with (Y-extent . ,ly:grob::stencil-height)
2560 ;; and the print function is not pure, but there is a easy way to
2561 ;; figure out the Y-extent from the print function.
2562 (define pure-print-to-height-conversions
2563   `(
2564     (,ly:arpeggio::print . ,ly:arpeggio::pure-height)
2565     (,ly:arpeggio::brew-chord-bracket . ,ly:arpeggio::pure-height)
2566     (,ly:arpeggio::brew-chord-slur . ,ly:arpeggio::pure-height)
2567     (,ly:hairpin::print . ,ly:hairpin::pure-height)
2568     (,ly:volta-bracket-interface::print . ,volta-bracket-interface::pure-height)))
2570 ;; ly:grob::stencil-extent is safe if the print callback is safe too
2571 (define (pure-stencil-height grob start stop)
2572   (let* ((sten (ly:grob-property-data grob 'stencil))
2573          (pure-height-callback (assoc-get sten pure-print-to-height-conversions)))
2574     (cond ((or
2575             (ly:stencil? sten)
2576             (memq sten pure-print-callbacks))
2577            (ly:grob::stencil-height grob))
2578           ((procedure? pure-height-callback)
2579            (pure-height-callback grob start stop))
2580           (else
2581            '(0 . 0)))))
2583 ;; Sometimes, a pure callback will be chained to a non-pure callback via
2584 ;; chain_offset_callback, in which case this provides a default by simply
2585 ;; passing through the value from the pure callback.
2586 (define (pure-chain-offset-callback grob start end prev-offset) prev-offset)
2588 (define pure-conversions-alist
2589   `(
2590     (,ly:accidental-interface::height . ,ly:accidental-interface::pure-height)
2591     (,ly:axis-group-interface::calc-staff-staff-spacing . ,ly:axis-group-interface::calc-pure-staff-staff-spacing)
2592     (,ly:axis-group-interface::height . ,ly:axis-group-interface::pure-height)
2593     (,ly:grob::stencil-height . ,pure-stencil-height)
2594     (,ly:hara-kiri-group-spanner::y-extent . ,ly:hara-kiri-group-spanner::pure-height)
2595     (,ly:rest-collision::force-shift-callback-rest . ,pure-chain-offset-callback)
2596     (,ly:rest::height . ,ly:rest::pure-height)
2597     (,ly:self-alignment-interface::y-aligned-on-self . ,ly:self-alignment-interface::pure-y-aligned-on-self)
2598     (,ly:side-position-interface::y-aligned-side . ,ly:side-position-interface::pure-y-aligned-side)
2599     (,ly:slur::height . ,ly:slur::pure-height)
2600     (,ly:slur::outside-slur-callback . ,ly:slur::pure-outside-slur-callback)
2601     (,ly:stem::height . ,ly:stem::pure-height)
2602     (,ly:system::height . ,ly:system::calc-pure-height)))
2604 (define pure-functions
2605   (list
2606    parenthesize-elements
2607    laissez-vibrer::print
2608    ly:rest::y-offset-callback
2609    ly:staff-symbol-referencer::callback
2610    ly:staff-symbol::height))
2612 (define-public (pure-relevant? grob)
2613   (let ((extent-callback (ly:grob-property-data grob 'Y-extent)))
2614     (not (eq? #f
2615               (or
2616                (pair? extent-callback)
2617                (memq extent-callback pure-functions)
2618                (and
2619                 (pair? (assq extent-callback pure-conversions-alist))
2620                 (let ((stencil (ly:grob-property-data grob 'stencil)))
2621                   (or
2622                    (not (eq? extent-callback ly:grob::stencil-height))
2623                    (memq stencil pure-print-callbacks)
2624                    (assq stencil pure-print-to-height-conversions)
2625                    (ly:stencil? stencil)))))))))
2627 (define-public (call-pure-function unpure args start end)
2628   (if (ly:simple-closure? unpure)
2629       (ly:eval-simple-closure (car args) unpure start end)
2630       (if (not (procedure? unpure))
2631           unpure
2632           (if (memq unpure pure-functions)
2633               (apply unpure args)
2634               (let ((pure (assq unpure pure-conversions-alist)))
2635                 (if pure
2636                     (apply (cdr pure)
2637                            (append
2638                             (list (car args) start end)
2639                             (cdr args)))))))))