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