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