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