]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* lily/grob.cc (get_stencil): simplify: use callback mechanism to
[lilypond.git] / scm / define-grobs.scm
1 ;;;; define-grobs.scm --
2 ;;;;
3 ;;;;  source file of the GNU LilyPond music typesetter
4 ;;;;
5 ;;;; (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
6 ;;;;                 Jan Nieuwenhuizen <janneke@gnu.org>
7
8 ;;;; distances are given in linethickness (thicknesses) and
9 ;;;; staffspace (distances)
10
11 ;;;; WARNING: the meta field should be the last one.
12 ;;;; WARNING: don't use anonymous functions for initialization.
13
14 ;; TODO: junk the meta field in favor of something more compact?
15
16 ;;; todo:: reorder sensibly.
17
18 (define-public all-grob-descriptions
19   `(
20     (Accidental
21      . (
22         (avoid-slur . inside)
23         (cautionary-style . parentheses)
24         (callbacks . ((stencil . ,Accidental_interface::print)
25                       (after-line-breaking . ,Accidental_interface::after_line_breaking)))
26         
27         (meta . ((class . Item)
28                  (interfaces . (accidental-interface
29                                 font-interface))))))
30     
31     (AccidentalSuggestion
32      . (
33
34         (callbacks . ((stencil . ,Accidental_interface::print)))
35         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
36                                ,Self_alignment_interface::aligned_on_self))
37         (self-alignment-X . ,CENTER)
38         (cautionary . #t)
39         (cautionary-style . smaller)
40         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
41         (cautionary-style . parentheses)
42         (direction . ,UP)
43         (staff-padding . 0.25)
44         (script-priority . 0)
45         (meta . ((class . Item)
46                  (interfaces . (side-position-interface
47                                 script-interface
48                                 accidental-interface
49                                 accidental-suggestion-interface
50                                 self-alignment-interface
51                                 font-interface))))))
52     (AccidentalPlacement
53      . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
54         (left-padding . 0.2)
55         (callbacks . ((positioning-done . ,Accidental_placement::calc_positioning_done)
56                       ))
57         ;; this is quite small, but it is very ugly to have
58         ;; accs closer to the previous note than to the next one.
59         (right-padding . 0.15)
60         (meta . ((class . Item)
61                  (interfaces . (accidental-placement-interface))))))
62     (Ambitus
63      . (
64         (axes . (0 1))
65         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
66         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
67         (space-alist . (
68                         (clef . (extra-space . 0.5))
69                         (key-signature . (extra-space . 0.0))
70                         (staff-bar . (extra-space . 0.0))
71                         (time-signature . (extra-space . 0.0))
72                         (first-note . (fixed-space . 0.0))))
73         (breakable . #t)
74         (break-align-symbol . ambitus)
75         (break-visibility . ,begin-of-line-visible)
76         (meta . ((class . Item)
77                  (interfaces . (axis-group-interface
78                                 break-aligned-interface
79                                 ambitus-interface))))))
80
81     (AmbitusLine
82      . (
83         (callbacks . (  (stencil . ,Ambitus::print)))
84         (join-heads . #t)
85         (thickness . 2)
86         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
87
88         (meta . ((class . Item)
89                  (interfaces . (ambitus-interface
90                                 staff-symbol-referencer-interface
91                                 font-interface))))))
92     (AmbitusAccidental
93      . (
94         (font-family . music)
95         (padding . 0.5)
96         (X-offset-callbacks . (,Side_position_interface::aligned_side))
97         (direction . -1)
98         (cautionary-style . parentheses)
99         (callbacks . ((stencil . ,Accidental_interface::print)
100                       (after-line-breaking . ,Accidental_interface::after_line_breaking)
101                       ))
102         (meta . ((class . Item)
103                  (interfaces . (item-interface
104                                 accidental-interface
105                                 break-aligned-interface
106                                 side-position-interface
107                                 font-interface))))))
108
109     (AmbitusNoteHead
110      . (
111         (duration-log . 2)
112         (callbacks . (  (stencil . ,Note_head::print)))
113         (glyph-name-procedure . ,find-notehead-symbol)
114         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
115         (meta . ((class . Item)
116                  (interfaces . (font-interface
117                                 note-head-interface
118                                 ambitus-interface
119                                 staff-symbol-referencer-interface
120                                 rhythmic-head-interface
121                                 ledgered-interface))))))
122
123     (Arpeggio
124      . (
125         (X-extent-callback . ,Arpeggio::width_callback)
126         (callbacks . (  (stencil . ,Arpeggio::print)))
127         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
128         (X-offset-callbacks . (,Side_position_interface::aligned_side))
129         (direction . -1)
130         (padding . 0.5)
131         (staff-position . 0.0)
132         (meta . ((class . Item)
133                  (interfaces . (arpeggio-interface
134                                 staff-symbol-referencer-interface
135                                 side-position-interface
136                                 font-interface))))))
137
138     (BarLine
139      . (
140         (break-align-symbol . staff-bar)
141         (glyph . "|")
142         (break-glyph-function . ,default-break-barline)
143         (layer . 0)
144         (bar-size-procedure . ,Bar_line::get_staff_bar_size)
145         (break-visibility . ,all-visible)
146         (breakable . #t)
147         (callbacks . ((stencil . ,Bar_line::print)
148                       (before-line-breaking . ,Bar_line::before_line_breaking)))
149         (space-alist . (
150                         (time-signature . (extra-space . 0.75))
151                         (custos . (minimum-space . 2.0))
152                         (clef . (minimum-space . 1.0))
153                         (key-signature . (extra-space . 1.0))
154                         (key-cancellation . (extra-space . 1.0))
155                         (first-note . (fixed-space . 1.3))
156                         (next-note . (semi-fixed-space . 1.3))
157                         (right-edge . (extra-space . 0.0))))
158
159         ;;
160         ;; Ross. page 151 lists other values, we opt for a leaner look
161         ;;
162         ;; TODO:
163         ;; kern should scale with linethickness too.
164         (kern . 3.0)
165         (thin-kern . 3.0)
166         (hair-thickness . 1.9)
167         (thick-thickness . 6.0)
168         (meta . ((class . Item)
169                  (interfaces . (bar-line-interface
170                                 break-aligned-interface
171                                 font-interface))))))
172
173     (BarNumber
174      . (
175         (callbacks . ((stencil . ,Text_interface::print)))
176         (breakable . #t)
177         (break-visibility . ,begin-of-line-visible)
178         (padding . 1.0)
179         (direction . 1)
180         (font-family . roman)
181         (font-size . -2)
182         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
183         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
184         (self-alignment-X . 1)
185
186         (meta .
187               ((class . Item)
188                (interfaces . (side-position-interface
189                               text-interface
190                               self-alignment-interface
191                               font-interface
192                               break-aligned-interface))))
193         ))
194
195     (BassFigure
196      . (
197         (callbacks . ((stencil . ,Text_interface::print)))
198         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
199         (direction . 1)
200         (font-family . number)
201
202         ;; We must do this, other BFs in
203         ;; layout16 become too small.
204         (font-size . -4)
205         (kern . 0.2)
206         (meta . ((class . Item)
207                  (interfaces . (text-interface
208                                 rhythmic-grob-interface
209                                 bass-figure-interface
210                                 self-alignment-interface
211                                 font-interface))))))
212
213     (NewBassFigure
214      . (
215         (callbacks . (  (stencil . ,Text_interface::print)))
216         (meta . ((class . Item)
217                  (interfaces . (text-interface
218                                 rhythmic-grob-interface
219                                 bass-figure-interface
220                                 font-interface))))))
221     (BassFigureBracket
222      . ((callbacks . ((stencil . ,Enclosing_bracket::print)))
223         (edge-height . (0.2 . 0.2))
224         (meta . ((class . Item)
225                  (interfaces . (enclosing-bracket-interface)) ))
226         ))
227     (BassFigureContinuation
228      . (
229         (callbacks . (  (stencil . ,Figured_bass_continuation::print)))
230         (Y-offset-callbacks . (,Figured_bass_continuation::center_on_figures))
231         (meta . ((class . Spanner)
232                  (interfaces . (figured-bass-continuation-interface))
233                  ))))
234     (BassFigureLine
235      . (
236         (axes . (,Y))
237         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
238         (meta . ((class . Spanner)
239                  (interfaces . (axis-group-interface
240                                 ))))))
241
242     (BassFigureAlignment
243      . (
244         (axes . (,Y))
245         (threshold . (2 . 1000))
246         (callbacks . ((positioning-done . ,Align_interface::calc_positioning_done)
247                       ))
248         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
249         (stacking-dir . -1)
250         (meta . ((class . Spanner)
251                  (interfaces . (align-interface
252                                 axis-group-interface))))))
253     
254     (Beam
255      . (
256         ;; todo: clean this up a bit: the list is getting
257         ;; rather long.
258         (gap . 0.8)
259         (position-callbacks . (,Beam::least_squares
260                                ,Beam::check_concave
261                                ,Beam::slope_damping
262                                ,Beam::shift_region_to_valid
263                                ,Beam::quanting))
264         (callbacks . ((positions . ,Beam::calc_positions)
265                       (direction . ,Beam::calc_direction)
266                       (stencil . ,Beam::print)
267                       ))
268
269         ;; TODO: should be in SLT.
270         (thickness . 0.48) ; in staff-space
271         (neutral-direction . -1)
272         (dir-function . ,beam-dir-majority-median)
273
274         ;; Whe have some unreferenced problems here.
275         ;;
276         ;; If we shorten beamed stems less than normal stems (1 staffspace),
277         ;; or high order less than 8th beams, patterns like
278         ;;     c''4 [c''8 c''] c''4 [c''16 c]
279         ;; are ugly (different stem lengths).
280         ;;
281         ;; But if we shorten 16th beams as much as 8th beams, a single
282         ;; forced 16th beam looks *very* short.
283
284         ;; We choose to shorten 8th beams the same as single stems,
285         ;; and high order beams less than 8th beams, so that all
286         ;; isolated shortened beams look nice and a bit shortened,
287         ;; sadly possibly breaking patterns with high order beams.
288         (beamed-stem-shorten . (1.0 0.5 0.25))
289
290         (flag-width-function . ,beam-flag-width-function)
291         (damping . 1)
292         (auto-knee-gap . 5.5)
293
294         ;; only for debugging.
295         (font-family . roman)
296
297         (space-function . ,Beam::space_function)
298         (meta . ((class . Spanner)
299                  (interfaces . (staff-symbol-referencer-interface
300                                 beam-interface))))))
301
302     (BreakAlignment
303      . (
304         (breakable . #t)
305         (stacking-dir . 1)
306         (callbacks . ((positioning-done . ,Break_align_interface::calc_positioning_done)
307                       ))
308         (break-align-orders . ;; end of line
309                             #((instrument-name
310                                left-edge
311                                ambitus
312                                breathing-sign
313                                clef
314                                staff-bar
315                                key-cancellation
316                                key-signature
317                                time-signature
318                                custos)
319
320                               ;; unbroken
321                               (instrument-name
322                                left-edge
323                                ambitus
324                                breathing-sign
325                                clef
326                                staff-bar
327                                key-cancellation
328                                key-signature
329                                staff
330                                time-signature custos)
331                               
332                               ;; begin of line
333                               (instrument-name
334                                left-edge
335                                ambitus
336                                breathing-sign
337                                clef
338                                key-cancellation
339                                key-signature
340                                staff-bar
341                                time-signature
342                                custos)))
343         (axes . (0))
344         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
345         (meta . ((class . Item)
346                  (interfaces . (break-alignment-interface
347                                 axis-group-interface))))))
348
349     (BreakAlignGroup
350      . (
351         (axes . (0))
352         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
353         (meta . ((class . Item)
354                  (interfaces . (break-aligned-interface
355                                 axis-group-interface))))))
356
357     (BreathingSign
358      . (
359         (break-align-symbol . breathing-sign)
360         (breakable . #t)
361         (space-alist . (
362                         (ambitus . (extra-space . 2.0))
363                         (custos . (minimum-space . 1.0))
364                         (key-signature . (minimum-space . 1.5))
365                         (staff-bar . (minimum-space . 1.5))
366                         (clef . (minimum-space . 2.0))
367                         (first-note . (fixed-space . 1.0)) ;huh?
368                         (right-edge . (extra-space . 0.1))))
369         (callbacks . ((stencil . ,Text_interface::print)))
370         (text . ,(make-musicglyph-markup "scripts.rcomma"))
371         (Y-offset-callbacks . (,Breathing_sign::offset_callback))
372         (break-visibility . ,begin-of-line-invisible)
373         (meta . ((class . Item)
374                  (interfaces . (break-aligned-interface
375                                 breathing-sign-interface
376                                 text-interface
377                                 font-interface))))))
378
379     (Clef
380      . (
381         (callbacks . ((stencil . ,Clef::print)
382                       (before-line-breaking . ,Clef::before_line_breaking)
383                       ))
384         (breakable . #t)
385         (font-family . music)
386         (break-align-symbol . clef)
387         (break-visibility . ,begin-of-line-visible)
388         (space-alist . ((ambitus . (extra-space . 2.0))
389                         (staff-bar . (extra-space . 0.7))
390                         (key-cancellation . (minimum-space . 4.0))
391                         (key-signature . (minimum-space . 4.0))
392                         (time-signature . (minimum-space . 4.2))
393                         (first-note . (minimum-fixed-space . 5.0))
394                         (next-note . (extra-space . 0.5))
395                         (right-edge . (extra-space . 0.5))))
396         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
397         (meta . ((class . Item)
398                  (interfaces . (clef-interface
399                                 staff-symbol-referencer-interface
400                                 font-interface
401                                 break-aligned-interface))))))
402
403     (ClusterSpannerBeacon
404      . (
405         (Y-extent-callback . ,Cluster_beacon::height)
406         (meta . ((class . Item)
407                  (interfaces . (cluster-beacon-interface))))))
408
409     (ClusterSpanner
410      . (
411         (callbacks . ((stencil . ,Cluster::print)))
412         (spacing-procedure . ,Spanner::set_spacing_rods)
413         (minimum-length . 0.0)
414         (padding . 0.25)
415         (style . ramp)
416         (meta . ((class . Spanner)
417                  (interfaces . (cluster-interface))))))
418
419     (ChordName
420      . (
421         (callbacks . ((stencil . ,Text_interface::print)))
422         (callbacks . ((after-line-breaking . ,Chord_name::after_line_breaking)
423                       ))
424         (word-space . 0.0)
425         (font-family . sans)
426         (font-size . 1.5)
427         (meta . ((class . Item)
428                  (interfaces . (font-interface
429                                 rhythmic-grob-interface
430                                 text-interface
431                                 chord-name-interface
432                                 item-interface))))))
433
434     (CombineTextScript
435      . (
436         (callbacks . ((stencil . ,Text_interface::print)))
437         (no-spacing-rods . #t)
438         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
439         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
440         (direction . 1)
441         (padding . 0.5)
442         (staff-padding . 0.5)
443         (script-priority . 200)
444         ;; todo: add X self alignment?
445         (baseline-skip . 2)
446         (font-series . bold)
447         (meta . ((class . Item)
448                  (interfaces . (text-script-interface
449                                 text-interface
450                                 side-position-interface
451                                 font-interface))))))
452
453     (Custos
454      . (
455         (break-align-symbol . custos)
456         (breakable . #t)
457         (callbacks . ((stencil . ,Custos::print)))
458         (break-visibility . ,end-of-line-visible)
459         (style . vaticana)
460         (neutral-direction . -1)
461         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
462         (space-alist . (
463                         (first-note . (minimum-fixed-space . 0.0))
464                         (right-edge . (extra-space . 0.1))))
465         (meta . ((class . Item)
466                  (interfaces
467                   . (custos-interface
468                      staff-symbol-referencer-interface
469                      font-interface
470                      break-aligned-interface))))))
471
472     (DotColumn
473      . (
474         (axes . (0))
475         (direction . ,RIGHT)
476         (callbacks . ((positioning-done . ,Dot_column::calc_positioning_done) 
477                       ))
478         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
479         (X-offset-callbacks . (,Dot_column::side_position))
480         (meta . ((class . Item)
481                  (interfaces . (dot-column-interface
482                                 axis-group-interface))))))
483
484     (Dots
485      . (
486         (callbacks . ((stencil . ,Dots::print)))
487         (dot-count . 1)
488         (meta . ((class . Item)
489                  (interfaces . (font-interface
490                                 staff-symbol-referencer-interface
491                                 dots-interface))))))
492
493     (DoublePercentRepeat
494      . (
495         (callbacks . ((stencil . ,Percent_repeat_item_interface::double_percent)))
496         (breakable . #t)
497         (slope . 1.0)
498         (font-encoding . fetaMusic)
499         (width . 2.0)
500         (thickness . 0.48)
501         (break-align-symbol . staff-bar)
502         (break-visibility . ,begin-of-line-invisible)
503         (meta . ((class . Item)
504                  (interfaces . (font-interface
505                                 break-aligned-interface
506                                 percent-repeat-interface))))))
507
508     (DoublePercentRepeatCounter
509      . (
510         (callbacks . ((stencil . ,Text_interface::print)))
511         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
512                                ,Self_alignment_interface::centered_on_other_axis_parent))
513         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
514         (font-encoding . fetaNumber)
515         (self-alignment-X . 0)
516         (font-size . -2) 
517         (direction . 1)
518         (padding . 0.2)
519         (staff-padding . 0.25)
520         (meta . ((class . Item)
521                  (interfaces . (side-position-interface
522                                 self-alignment-interface
523                                 percent-repeat-interface
524                                 font-interface
525                                 text-interface))))))
526     (DynamicLineSpanner
527      . (
528         (axes . (1))
529         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
530         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
531         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
532         (staff-padding . 0.1)
533         (padding . 0.6)
534         (avoid-slur . outside)
535         (slur-padding . 0.3)
536         (minimum-space . 1.2)
537         (direction . -1)
538
539         (meta . ((class . Spanner)
540                  (interfaces . (axis-group-interface
541                                 dynamic-interface
542                                 dynamic-line-spanner-interface
543                                 side-position-interface))))))
544
545     (DynamicText
546      . (
547         
548         ;; todo.
549         (callbacks . ((stencil . ,Text_interface::print)
550                       (before-line-breaking . ,Script_interface::before_line_breaking)))
551         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
552         (self-alignment-X . 0)
553         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
554         (self-alignment-Y . 0)
555         (font-series . bold)
556         (font-encoding . fetaDynamic)
557         (font-shape . italic)
558         (no-spacing-rods . #t)
559         (script-priority . 100)
560         (meta . ((class . Item)
561                  (interfaces . (font-interface
562                                 text-interface
563                                 self-alignment-interface
564                                 dynamic-interface
565                                 script-interface))))))
566
567     (DynamicTextSpanner
568      . (
569         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
570         ;; rather ugh with NCSB
571         ;; (font-series . bold)
572         (font-shape . italic)
573         (style . dashed-line)
574
575         ;; need to blend with dynamic texts.
576         (font-size . 1)
577         (bound-padding . 0.75)
578         (dash-fraction . 0.2)
579         (dash-period . 3.0)
580         (meta . ((class . Spanner)
581                  (interfaces . (font-interface
582                                 text-interface
583                                 dynamic-interface
584                                 dynamic-text-spanner-interface
585                                 spanner-interface))))))
586
587     (Fingering
588      . (
589
590         ;; sync with TextScript (?)
591
592         (padding . 0.5)
593         (avoid-slur . around)
594         (slur-padding . 0.2)
595         (staff-padding . 0.5)
596         (self-alignment-X . 0)
597         (self-alignment-Y . 0)
598         (script-priority . 100)
599         (callbacks . ((stencil . ,Text_interface::print)
600                       (before-line-breaking . ,Script_interface::before_line_breaking)))
601         (font-encoding . fetaNumber)
602         (font-size . -5)                ; don't overlap when next to heads.
603         (meta . ((class . Item)
604                  (interfaces . (finger-interface
605                                 font-interface
606                                 text-script-interface
607                                 text-interface
608                                 side-position-interface
609                                 self-alignment-interface
610                                 item-interface))))))
611     (Glissando
612      . (
613         (style . line)
614         (gap . 0.5)
615         (zigzag-width . 0.75)
616         (breakable . #t)
617         (X-extent-callback . #f)
618         (Y-extent-callback . #f)
619         (callbacks . ((stencil . ,Line_spanner::print)
620                       (after-line-breaking . ,Line_spanner::after_line_breaking)
621                       ))
622         
623         (meta . ((class . Spanner)
624                  (interfaces . (line-interface
625                                 line-spanner-interface))))))
626
627     (GridPoint
628      . (
629         (X-extent . (0 . 0))
630         (Y-extent . (0 . 0))
631         (meta . ((class . Item)
632                  (interfaces . (grid-point-interface))))))
633
634     (GridLine
635      . (
636         (callbacks . (stencil . ,Grid_line_interface::print))
637         (X-extent-callback  . ,Grid_line_interface::width_callback)
638         (self-alignment-X . ,CENTER)
639         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
640                                ,Self_alignment_interface::centered_on_parent))
641         (layer . 0)
642         (meta . ((class . Item)
643                  (interfaces . (self-alignment-interface
644                                 grid-line-interface))))))
645
646     (Hairpin
647      . (
648         
649         (callbacks . ((stencil . ,Hairpin::print)
650                       (after-line-breaking . ,Hairpin::after_line_breaking)))
651         (thickness . 1.0)
652         (height . 0.6666)
653         (spacing-procedure . ,Spanner::set_spacing_rods)
654         (minimum-length . 2.0)
655         (bound-padding . 1.0)
656         (self-alignment-Y . 0)
657         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
658         (meta . ((class . Spanner)
659                  (interfaces . (hairpin-interface
660                                 line-interface
661                                 self-alignment-interface
662                                 dynamic-interface
663                                 spanner-interface))))))
664
665     (HorizontalBracket
666      . (
667         (thickness . 1.0)
668         (callbacks . ((stencil . ,Horizontal_bracket::print)))
669         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
670         (padding . 0.2)
671         (staff-padding . 0.2)
672         (direction . -1)
673         (bracket-flare . (0.5 . 0.5))
674         (meta . ((class . Spanner)
675                  (interfaces . (horizontal-bracket-interface
676                                 side-position-interface
677                                 line-interface
678                                 spanner-interface))))))
679     (InstrumentName
680      . (
681         (breakable . #t)
682         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
683                                ,Side_position_interface::aligned_on_support_refpoints))
684         ;; This direction is for aligned_on_support_refpoints
685         ;; (?) --hwn
686         (direction . 0)
687         (space-alist . (
688                         (left-edge . (extra-space . 1.0))))
689
690         (self-alignment-Y . 0)
691         (callbacks . ((stencil . ,Text_interface::print)))
692         (break-align-symbol . instrument-name)
693         (break-visibility . ,begin-of-line-visible)
694         (baseline-skip . 2)
695         (meta . ((class . Item)
696                  (interfaces . (font-interface
697                                 self-alignment-interface
698                                 side-position-interface
699                                 text-interface
700                                 break-aligned-interface))))))
701
702     (KeyCancellation
703      . (
704         (callbacks . ((stencil . ,Key_signature_interface::print)))
705         (space-alist . (
706                         (time-signature . (extra-space . 1.25))
707                         (staff-bar . (extra-space . 0.6))
708                         (key-signature . (extra-space . 0.5))
709                         (right-edge . (extra-space . 0.5))
710                         (first-note . (fixed-space . 2.5))))
711         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
712         (break-align-symbol . key-cancellation)
713         (break-visibility . ,begin-of-line-invisible)
714         (breakable . #t)
715
716         (meta . ((class . Item)
717                  (interfaces . (key-signature-interface
718                                 font-interface
719                                 break-aligned-interface))))))
720     (KeySignature
721      . (
722         (callbacks . ((stencil . ,Key_signature_interface::print)))
723         (space-alist . (
724                         (time-signature . (extra-space . 1.25))
725                         (staff-bar . (extra-space . 1.1))
726                         (right-edge . (extra-space . 0.5))
727                         (first-note . (fixed-space . 2.5))))
728         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
729         (break-align-symbol . key-signature)
730         (break-visibility . ,begin-of-line-visible)
731         (breakable . #t)
732
733         (meta . ((class . Item)
734                  (interfaces . (key-signature-interface
735                                 font-interface
736                                 break-aligned-interface))))))
737     (LaissezVibrerTie
738      . (
739         (callbacks . ((stencil  . ,Tie::print)
740                       (control-points . ,Laissez_vibrer_tie::calc_control_points)
741                       (direction . ,Laissez_vibrer_tie::calc_direction)
742                       ))
743         (details . ((ratio . 0.333)
744                     (height-limit . 1.0)))
745         (thickness . 1.0)
746         (meta . ((class . Item)
747                  (interfaces . (laissez-vibrer-tie-interface))
748                  ))
749         ))
750     
751     (LaissezVibrerTieColumn
752      . (
753         (X-extent-callback . #f)
754         (Y-extent-callback . #f)
755         (callbacks . ((positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
756                       ))
757         (meta . ((class . Item)
758                  (interfaces . (laissez-vibrer-tie-column-interface))
759                  ))
760         ))
761     
762     (LedgerLineSpanner
763      . (
764         (callbacks . ((stencil . ,Ledger_line_spanner::print)))
765         (X-extent-callback . #f)
766         (Y-extent-callback . #f)
767         (minimum-length-fraction . 0.25)
768         (length-fraction . 0.25)
769         (spacing-procedure . ,Ledger_line_spanner::set_spacing_rods)
770         (layer . 0)
771         (meta . ((class . Spanner)
772                  (interfaces . (ledger-line-interface))))))
773
774     (LeftEdge
775      . (
776         (break-align-symbol . left-edge)
777         (X-extent . (0 . 0))
778         (breakable . #t)
779         (break-visibility . ,center-invisible)
780         (space-alist . (
781                         (custos . (extra-space . 0.0))
782                         (ambitus . (extra-space . 2.0))
783                         (time-signature . (extra-space . 1.0))
784                         (staff-bar . (extra-space . 0.0))
785                         (breathing-sign . (minimum-space . 0.0))
786                         (clef . (extra-space . 0.8))
787                         (first-note . (fixed-space . 2.0))
788                         (right-edge . (extra-space . 0.0))
789                         (key-signature . (extra-space . 0.0))
790                         (key-cancellation . (extra-space . 0.0))
791                         ))
792         (meta . ((class . Item)
793                  (interfaces . (break-aligned-interface))))))
794
795     (LigatureBracket
796      . (
797         (ligature-primitive-callback . ,Note_head::print)
798         
799         ;; ugh.  A ligature bracket is totally different from
800         ;; a tuplet bracket.
801         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
802                       (positions . ,Tuplet_bracket::calc_positions)
803                       (stencil . ,Tuplet_bracket::print)
804                       ))
805         (direction . 1)
806         (gap . 0.0)
807         (padding . 2.0)
808         (thickness . 1.6)
809         (edge-height . (0.7 . 0.7))
810         (shorten-pair . (-0.2 . -0.2))
811         (meta . ((class . Spanner)
812                  (interfaces . (tuplet-bracket-interface
813                                 line-interface))))))
814
815     (LyricHyphen
816      . (
817         (thickness . 1.3)
818         (height . 0.42)
819         (dash-period . 10.0)
820         (length . 0.66)
821         (minimum-length . 0.3)
822         (padding . 0.07)
823                                         ;       (spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
824         (callbacks . ((stencil . ,Hyphen_spanner::print)))
825         (Y-extent . (0 . 0))
826         (meta . ((class . Spanner)
827                  (interfaces . (lyric-interface
828                                 lyric-hyphen-interface
829                                 spanner-interface))))))
830
831     (LyricExtender
832      . (
833         (callbacks . ((stencil . ,Lyric_extender::print)))
834         (thickness . 0.8) ; linethickness
835         (minimum-length . 1.5)
836         (Y-extent . (0 . 0))
837         (meta . ((class . Spanner)
838                  (interfaces . (lyric-interface
839                                 lyric-extender-interface))))))
840
841     (LyricText
842      . ((callbacks . ((stencil . ,Text_interface::print)))
843         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
844         (self-alignment-X . 0)
845         (word-space . 0.6)
846         (font-series . bold-narrow)
847         (font-size . 1.0)
848         (meta . ((class . Item)
849                  (interfaces . (rhythmic-grob-interface
850                                 lyric-syllable-interface
851                                 self-alignment-interface
852                                 text-interface
853                                 font-interface))))))
854
855     (MensuralLigature
856      . (
857         (thickness . 1.4)
858         (flexa-width . 2.0)
859         (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
860         (callbacks . ((stencil . ,Mensural_ligature::print)))
861         (meta . ((class . Spanner)
862                  (interfaces . (mensural-ligature-interface
863                                 font-interface))))))
864
865     (MetronomeMark
866      . (
867         (callbacks . ((stencil . ,Text_interface::print)))
868         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
869         (direction . 1)
870         (padding . 0.8)
871         (meta . ((class . Item)
872                  (interfaces . (text-interface
873                                 side-position-interface
874                                 font-interface
875                                 metronome-mark-interface))))))
876     (MeasureGrouping
877      . (
878         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
879         (callbacks . (stencil . ,Measure_grouping::print))
880         (padding . 2)
881         (direction . 1)
882         (thickness . 1)
883         (height . 2.0)
884         (staff-padding . 3)
885         (meta . ((class . Spanner)
886                  (interfaces . (side-position-interface
887                                 measure-grouping-interface))))))
888     (MultiMeasureRest
889      . (
890         (callbacks . ((stencil . ,Multi_measure_rest::print)))
891         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
892         (staff-position . 0)
893         (expand-limit . 10)
894         (thick-thickness . 6.6)
895         (hair-thickness . 2.0)
896         (padding . 1)
897         (meta . ((class . Spanner)
898                  (interfaces . (multi-measure-rest-interface
899                                 multi-measure-interface
900                                 rest-interface
901                                 font-interface
902                                 staff-symbol-referencer-interface))))))
903
904     (MultiMeasureRestNumber
905      . (
906         (callbacks . ((stencil . ,Text_interface::print)))
907         (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
908         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
909                                ,Self_alignment_interface::centered_on_other_axis_parent))
910         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
911         (self-alignment-X . 0)
912         (direction . 1)
913         (padding . 0.4)
914         (staff-padding . 0.4)
915         (font-encoding . fetaNumber)
916         (meta . ((class . Spanner)
917                  (interfaces . (side-position-interface
918                                 multi-measure-interface
919                                 self-alignment-interface
920                                 font-interface
921                                 text-interface))))))
922     
923     (MultiMeasureRestText
924      . (
925         (callbacks . ((stencil . ,Text_interface::print)))
926         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
927                                ,Self_alignment_interface::centered_on_other_axis_parent))
928         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
929         (self-alignment-X . 0)
930         (direction . 1)
931         (padding . 0.2)
932         (staff-padding . 0.25)
933         (meta . ((class . Spanner)
934                  (interfaces . (side-position-interface
935                                 multi-measure-interface
936                                 self-alignment-interface
937                                 font-interface
938                                 text-interface))))))
939
940     (NoteCollision
941      . (
942         (axes . (0 1))
943         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
944         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
945         (callbacks . ((positioning-done . ,Note_collision_interface::calc_positioning_done)
946                       ))
947         (meta . ((class . Item)
948                  (interfaces . (note-collision-interface
949                                 axis-group-interface))))))
950
951     (NoteColumn
952      . (
953         (axes . (0 1))
954         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
955         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
956         (meta . ((class . Item)
957                  (interfaces . (axis-group-interface
958                                 note-column-interface))))))
959
960     (NoteHead
961      . (
962         (callbacks . ((stencil . ,Note_head::print)))
963         (ligature-primitive-callback . ,Note_head::print)
964         (glyph-name-procedure . ,find-notehead-symbol)
965         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
966         (X-offset-callbacks . (,Note_head::stem_x_shift))
967         (stem-attachment-function . ,note-head-style->attachment-coordinates)
968         (meta . ((class . Item)
969                  (interfaces . (rhythmic-grob-interface
970                                 rhythmic-head-interface
971                                 font-interface
972                                 note-head-interface
973                                 ledgered-interface
974                                 staff-symbol-referencer-interface))))))
975
976     (NoteSpacing
977      . (
978         (stem-spacing-correction . 0.5)
979         (same-direction-correction . 0.25)
980         ;; Changed this from 0.75.
981         ;; If you ever change this back, please document! --hwn
982         (knee-spacing-correction . 1.0)
983
984         (meta . ((class . Item)
985                  (interfaces . (spacing-interface
986                                 note-spacing-interface))))))
987
988     (NoteName
989      . (
990         (callbacks . ((stencil . ,Text_interface::print)))
991         (meta . ((class . Item)
992                  (interfaces . (note-name-interface
993                                 text-interface
994                                 font-interface))))))
995
996     (OctavateEight
997      . (
998         (self-alignment-X . 0)
999         (break-visibility . ,begin-of-line-visible)
1000         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
1001                                ,Self_alignment_interface::aligned_on_self))
1002         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1003         (callbacks . ((stencil . ,Text_interface::print)))
1004
1005         ;; no Y dimensions, because of lyrics under tenor clef.
1006         (Y-extent . (0 . 0))
1007         (font-shape . italic)
1008         (padding . 0.6)
1009         (staff-padding . 0.2)
1010         (font-size . -4)
1011         (meta . ((class . Item)
1012                  (interfaces . (text-interface
1013                                 self-alignment-interface
1014                                 side-position-interface
1015                                 font-interface))))))
1016
1017     (OttavaBracket
1018      . (
1019         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1020         (callbacks . ((stencil . ,Ottava_bracket::print)))
1021         (font-shape . italic)
1022         (shorten-pair . (0.0 . -0.6))
1023         (staff-padding . 1.0)
1024         (padding . 0.5)
1025         (minimum-length . 1.0)
1026         (dash-fraction . 0.3)
1027         (edge-height . (0 . 1.2))
1028         (direction . 1)
1029         (meta . ((class . Spanner)
1030                  (interfaces . (ottava-bracket-interface
1031                                 horizontal-bracket-interface
1032                                 line-interface
1033                                 side-position-interface
1034                                 font-interface
1035                                 text-interface))))))
1036
1037     (PaperColumn
1038      . (
1039         (axes . (0))
1040         (callbacks . ((before-line-breaking . ,Paper_column::before_line_breaking)
1041                       ;; (stencil . ,Paper_column::print)
1042                       ))
1043         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1044
1045         ;; debugging
1046         ;;                       (font-size . -6) (font-name . "sans") (Y-extent-callback . #f)
1047         (meta . ((class . Paper_column)
1048                  (interfaces . (paper-column-interface
1049                                 axis-group-interface
1050                                 spaceable-grob-interface))))))
1051
1052     (PhrasingSlur
1053      . ((slur-details . ,default-slur-details)
1054         (callbacks . ((control-points . ,Slur::calc_control_points)
1055                       (direction . ,Slur::calc_direction)
1056                       (stencil . ,Slur::print)                
1057                       ))
1058         
1059         (thickness . 1.1)
1060         (spacing-procedure . ,Spanner::set_spacing_rods)
1061         (minimum-length . 1.5)
1062         (Y-extent-callback . ,Slur::height)
1063         (height-limit . 2.0)
1064         (ratio . 0.333)
1065         (meta . ((class . Spanner)
1066                  (interfaces . (slur-interface))))))
1067
1068     (NonMusicalPaperColumn
1069      . (
1070         (axes . (0))
1071         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1072         (callbacks . ((before-line-breaking . ,Paper_column::before_line_breaking)
1073                       ;;                      (stencil . ,Paper_column::print)
1074                       ))
1075         (breakable . #t)
1076
1077         ;; debugging stuff: print column number.
1078         ;;               (font-size . -6) (font-name . "sans")  (Y-extent-callback . #f)
1079
1080         (meta . ((class . Paper_column)
1081                  (interfaces . (paper-column-interface
1082                                 axis-group-interface
1083                                 spaceable-grob-interface))))))
1084
1085     (PercentRepeat
1086      . (
1087         (spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
1088         (callbacks . ((stencil . ,Multi_measure_rest::percent)))
1089         (slope . 1.0)
1090         (thickness . 0.48)
1091         (font-encoding . fetaMusic)
1092         (meta . ((class . Spanner)
1093                  (interfaces . (multi-measure-rest-interface
1094                                 font-interface
1095                                 percent-repeat-interface))))))
1096     (PercentRepeatCounter
1097      . ((callbacks . ((stencil . ,Text_interface::print)))
1098         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
1099                                ,Self_alignment_interface::centered_on_other_axis_parent))
1100         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1101         (self-alignment-X . 0)
1102         (direction . 1)
1103         (padding . 0.2)
1104         (staff-padding . 0.25)
1105         (font-size . -2) 
1106         (font-encoding . fetaNumber)
1107         (meta . ((class . Spanner)
1108                  (interfaces . (side-position-interface
1109                                 self-alignment-interface
1110                                 percent-repeat-interface
1111                                 font-interface
1112                                 text-interface))))))
1113
1114     ;; an example of a text spanner
1115     (PianoPedalBracket
1116      . (
1117         (callbacks . ((stencil . ,Piano_pedal_bracket::print)))
1118         (style . line)
1119         (bound-padding . 1.0)
1120         (direction . -1)
1121         (bracket-flare . (0.5 . 0.5))
1122         (edge-height . (1.0 . 1.0))
1123         (shorten-pair . (0.0 . 0.0))
1124         (thickness .  1.0)
1125         (meta . ((class . Spanner)
1126                  (interfaces . (line-interface
1127                                 piano-pedal-interface
1128                                 piano-pedal-bracket-interface))))))
1129
1130     (RehearsalMark
1131      . (
1132         (callbacks . ((stencil . ,Text_interface::print)))
1133         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1134         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1135         (callbacks . ((after-line-breaking . ,shift-right-at-line-begin)))
1136         (self-alignment-X . 0)
1137         (direction . 1)
1138         (breakable . #t)
1139         (font-size . 2)
1140         (baseline-skip . 2)
1141         (break-visibility . ,end-of-line-invisible)
1142         (padding . 0.8)
1143         (meta . ((class . Item)
1144                  (interfaces . (text-interface
1145                                 side-position-interface
1146                                 font-interface
1147                                 mark-interface
1148                                 self-alignment-interface))))))
1149
1150     (RemoveEmptyVerticalGroup
1151      . (
1152         (Y-offset-callbacks . (,Hara_kiri_group_spanner::force_hara_kiri_callback))
1153         (Y-extent-callback . ,Hara_kiri_group_spanner::y_extent)
1154         (axes . (1))
1155         (meta . ((class . Spanner)
1156                  (interfaces . (axis-group-interface
1157                                 vertically-spaceable-interface
1158                                 hara-kiri-group-interface
1159                                 spanner-interface))))))
1160
1161     (RepeatSlash
1162      . (
1163         (callbacks . ((stencil . ,Percent_repeat_item_interface::beat_slash)))
1164         (thickness . 0.48)
1165         (slope . 1.7)
1166         (meta . ((class . Item)
1167                  (interfaces . (percent-repeat-interface))))))
1168     (Rest
1169      . (
1170         (X-extent-callback . ,Rest::extent_callback)
1171         (Y-extent-callback . ,Rest::extent_callback)
1172         (callbacks . ((stencil . ,Rest::print)))
1173         (Y-offset-callbacks . (
1174                                ,Staff_symbol_referencer::callback
1175                                ,Rest::polyphonic_offset_callback
1176                                ,Rest::y_offset_callback
1177                                ))
1178         (minimum-distance . 0.25)
1179         (meta . ((class . Item)
1180                  (interfaces . (font-interface
1181                                 rhythmic-head-interface
1182                                 rhythmic-grob-interface
1183                                 staff-symbol-referencer-interface
1184                                 rest-interface))))))
1185
1186     (RestCollision
1187      . (
1188         (minimum-distance . 0.75)
1189         (callbacks .  ((positioning-done . ,Rest_collision::calc_positioning_done)
1190                        ))
1191         (meta . ((class . Item)
1192                  (interfaces . (rest-collision-interface))))))
1193
1194     (Script
1195      . (
1196         ;; don't set direction here: it breaks staccato.
1197
1198         ;; This value is sensitive: if too large, staccato dots will move a
1199         ;; space a away.
1200         (padding . 0.20)
1201         (staff-padding . 0.25)
1202         ;; (script-priority . 0) priorities for scripts, see script.scm
1203         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
1204         (callbacks . ((stencil . ,Script_interface::print)
1205                       (before-line-breaking . ,Script_interface::before_line_breaking)))
1206         (font-encoding . fetaMusic)
1207         (meta . ((class . Item)
1208                  (interfaces . (script-interface
1209                                 side-position-interface
1210                                 font-interface))))))
1211
1212     (ScriptColumn
1213      . (
1214         (callbacks . ((before-line-breaking . ,Script_column::before_line_breaking)))
1215         (meta . ((class . Item)
1216                  (interfaces . (script-column-interface))))))
1217
1218     (SeparationItem
1219      . (
1220         (X-extent-callback . #f)
1221         (Y-extent-callback . #f)
1222         (meta . ((class . Item)
1223                  (interfaces . (spacing-interface
1224                                 separation-item-interface))))))
1225
1226     (SeparatingGroupSpanner
1227      . (
1228         (spacing-procedure . ,Separating_group_spanner::set_spacing_rods)
1229         (meta . ((class . Spanner)
1230                  (interfaces . (only-prebreak-interface
1231                                 spacing-interface
1232                                 separation-spanner-interface))))))
1233
1234     (Slur
1235      . ((slur-details . ,default-slur-details)
1236         (callbacks . ((control-points . ,Slur::calc_control_points)
1237                       (direction . ,Slur::calc_direction)
1238                       (stencil . ,Slur::print)
1239                       ))
1240         (thickness . 1.0)
1241         (spacing-procedure . ,Spanner::set_spacing_rods)
1242         (minimum-length . 1.5)
1243         (Y-extent-callback . ,Slur::height)
1244                                         ; Slur::height)
1245         (height-limit . 2.0)
1246         (ratio . 0.25)
1247         (meta . ((class . Spanner)
1248                  (interfaces . (slur-interface))))))
1249
1250     (SpacingSpanner
1251      . (
1252         (spacing-procedure . ,Spacing_spanner::set_springs)
1253         (grace-space-factor . 0.6)
1254         (shortest-duration-space . 2.0)
1255         (spacing-increment . 1.2)
1256         (base-shortest-duration . ,(ly:make-moment 3 16))
1257         (meta . ((class . Spanner)
1258                  (interfaces . (spacing-interface
1259                                 spacing-spanner-interface))))))
1260
1261     (SpanBar
1262      . (
1263         (break-align-symbol . staff-bar)
1264         (bar-size-procedure . ,Span_bar::get_bar_size)
1265         (X-extent-callback . ,Span_bar::width_callback)
1266         (Y-extent-callback . ())
1267         (layer . 0)
1268         (breakable . #t)
1269         (callbacks . ((stencil . ,Span_bar::print)
1270                       (before-line-breaking . ,Span_bar::before_line_breaking)))
1271         ;; ugh duplication!
1272
1273         ;;
1274         ;; Ross. page 151 lists other values, we opt for a leaner look
1275         ;;
1276         (kern . 3.0)
1277         (thin-kern . 3.0)
1278         (hair-thickness . 1.6)
1279         (thick-thickness . 6.0)
1280         (meta . ((class . Item)
1281                  (interfaces . (span-bar-interface
1282                                 font-interface
1283                                 bar-line-interface))))))
1284
1285     (StanzaNumber
1286      . ((callbacks . ((stencil . ,Text_interface::print)))
1287         (font-series . bold)
1288         (padding . 1.0)
1289         (X-offset-callbacks . (,Side_position_interface::aligned_side))
1290         (direction . ,LEFT)
1291         (meta . ((class . Item)
1292                  (interfaces . (side-position-interface
1293                                 stanza-number-interface
1294                                 text-interface
1295                                 font-interface))))))
1296
1297     (StringNumber
1298      . (
1299         (callbacks . ((stencil . ,print-circled-text-callback)))
1300         (padding . 0.5)
1301         (staff-padding . 0.5)
1302         (self-alignment-X . 0)
1303         (self-alignment-Y . 0)
1304         (script-priority . 100)
1305         (font-encoding . fetaNumber)
1306         (font-size . -5)                ; don't overlap when next to heads.
1307         (meta . ((class . Item)
1308                  (interfaces . (string-number-interface
1309                                 font-interface
1310                                 text-script-interface
1311                                 text-interface
1312                                 side-position-interface
1313                                 self-alignment-interface
1314                                 item-interface))))))
1315
1316     (StaffSpacing
1317      . (
1318         (breakable . #t)
1319         (stem-spacing-correction . 0.4)
1320         (meta . ((class . Item)
1321                  (interfaces . (spacing-interface
1322                                 staff-spacing-interface))))))
1323
1324     (SostenutoPedal
1325      . (
1326         (callbacks . ((stencil . ,Text_interface::print)))
1327         (direction . 1)
1328         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1329         (no-spacing-rods . #t)
1330         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1331         (font-shape . italic)
1332         (self-alignment-X . 0)
1333         (meta . ((class . Item)
1334                  (interfaces . (text-interface
1335                                 self-alignment-interface
1336                                 font-interface))))))
1337
1338     (SostenutoPedalLineSpanner
1339      . (
1340         (axes . (1))
1341         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1342         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1343
1344         (padding . 1.2)
1345         (minimum-space . 1.0)
1346         (direction . -1)
1347         (meta . ((class . Spanner)
1348                  (interfaces . (piano-pedal-interface
1349                                 axis-group-interface
1350                                 side-position-interface))))))
1351
1352     (StaffSymbol
1353      . (
1354         (callbacks . ((stencil . ,Staff_symbol::print)))
1355         (line-count . 5)
1356         (ledger-line-thickness . (1.0 . 0.1))
1357         (layer . 0)
1358         (meta . ((class . Spanner)
1359                  (interfaces . (staff-symbol-interface))))))
1360
1361     (Stem
1362      . (
1363         ;; this list is rather long. Trim --hwn
1364         (callbacks . ((direction . ,Stem::calc_direction)
1365                       (stem-end-position . ,Stem::calc_stem_end_position)
1366                       (stem-info . ,Stem::calc_stem_info)
1367                       (positioning-done . ,Stem::calc_positioning_done)
1368                       (stencil . ,Stem::print)
1369                       ))
1370         (thickness . 1.3)
1371
1372         ;; 3.5 (or 3 measured from note head) is standard length
1373         ;; 32nd, 64th flagged stems should be longer
1374         (lengths . (3.5 3.5 3.5 4.5 5.0))
1375
1376         ;; Stems in unnatural (forced) direction should be shortened by
1377         ;; one staff space, according to [Roush & Gourlay].
1378         ;; Flagged stems we shorten only half a staff space.
1379         (stem-shorten . (1.0 0.5))
1380
1381         ;; default stem direction for note on middle line
1382         (neutral-direction . -1)
1383
1384         ;; FIXME.  3.5 yields too long beams (according to Ross and
1385         ;; looking at Baerenreiter examples) for a number of common
1386         ;; boundary cases.  Subtracting half a beam thickness fixes
1387         ;; this, but the bug may well be somewhere else.
1388
1389         ;; FIXME this should come from 'lengths
1390
1391         (beamed-lengths . (3.26 3.5 3.6))
1392
1393         ;; We use the normal minima as minimum for the ideal lengths,
1394         ;; and the extreme minima as abolute minimum length.
1395
1396         ;; The 'normal' minima
1397         (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1398                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1399
1400         ;; The 'extreme case' minima
1401         (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1402
1403         (X-offset-callbacks . (,Stem::offset_callback))
1404         (X-extent-callback . ,Stem::width_callback)
1405         (Y-extent-callback . ,Stem::height)
1406         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1407         (meta . ((class . Item)
1408                  (interfaces . (stem-interface
1409                                 font-interface))))))
1410
1411     (StemTremolo
1412      . (
1413         (callbacks . ((stencil . ,Stem_tremolo::print)))
1414         (Y-extent-callback . ,Stem_tremolo::height)
1415         (X-extent-callback . #f)
1416
1417         (beam-width . 1.6) ; staff-space
1418         (beam-thickness . 0.48) ; staff-space
1419         (meta . ((class . Item)
1420                  (interfaces . (stem-tremolo-interface))))))
1421
1422     (SustainPedal
1423      . (
1424         (no-spacing-rods . #t)
1425         (callbacks . ((stencil . ,Sustain_pedal::print)))
1426         (self-alignment-X . 0)
1427         (direction . 1)
1428         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1429         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1430         (meta . ((class . Item)
1431                  (interfaces . (piano-pedal-interface
1432                                 text-spanner-interface
1433                                 text-interface
1434                                 self-alignment-interface
1435                                 font-interface))))))
1436
1437     (SustainPedalLineSpanner
1438      . (
1439         (axes . (1))
1440         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1441         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1442
1443         (padding . 1.2)
1444         (staff-padding . 1.2)
1445         (minimum-space . 1.0)
1446         (direction . -1)
1447         (meta . ((class . Spanner)
1448                  (interfaces . (piano-pedal-interface
1449                                 axis-group-interface
1450                                 side-position-interface))))))
1451
1452     (System
1453      . (
1454         (axes . (0 1))
1455         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1456         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1457         (meta . ((class . System)
1458                  (interfaces . (system-interface
1459                                 axis-group-interface))))))
1460
1461     (SystemStartBrace
1462      . (
1463         (glyph . "brace")
1464         (callbacks . ((stencil . ,System_start_delimiter::print)))
1465         (collapse-height . 5.0)
1466         (font-encoding . fetaBraces)
1467         (Y-extent-callback . #f)
1468         (meta . ((class . Spanner)
1469                  (interfaces . (system-start-delimiter-interface
1470                                 font-interface))))))
1471
1472     (SystemStartBracket
1473      . (
1474         (Y-extent-callback . #f)
1475         (X-offset-callbacks . (,(lambda (g a) -0.8)))
1476         (callbacks . ((stencil . ,System_start_delimiter::print)))
1477         (glyph . "bracket")
1478         (collapse-height . 5.0)
1479         (thickness . 0.45)
1480         (meta . ((class . Spanner)
1481                  (interfaces . (font-interface
1482                                 system-start-delimiter-interface))))))
1483
1484     (SystemStartBar
1485      . (
1486         (Y-extent-callback . #f)
1487         (glyph . "bar-line")
1488         (thickness . 1.6)
1489         (callbacks . ((stencil . ,System_start_delimiter::print)
1490                       (after-line-breaking . ,System_start_delimiter::after_line_breaking)))
1491         
1492         (meta . ((class . Spanner)
1493                  (interfaces . (system-start-delimiter-interface))))))
1494
1495     (TabNoteHead
1496      . (
1497         (callbacks . ((stencil . ,Text_interface::print)))
1498         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1499         (font-size . -2)
1500         (stem-attachment-function . ,tablature-stem-attachment-function)
1501         (font-series . bold)
1502         (meta . ((class . Item)
1503                  (interfaces
1504                   . (rhythmic-head-interface
1505                      font-interface
1506                      note-head-interface
1507                      staff-symbol-referencer-interface
1508                      text-interface))))))
1509
1510     (TextScript
1511      . (
1512         (no-spacing-rods . #t)
1513         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1514         (direction . -1)
1515
1516         ;; sync with Fingering ?
1517         (padding . 0.5)
1518         (staff-padding . 0.5)
1519         (callbacks . ((stencil . ,Text_interface::print)
1520                       (before-line-breaking . ,Script_interface::before_line_breaking)))
1521         (avoid-slur . around)
1522         (slur-padding . 0.5)
1523         (script-priority . 200)
1524         ;; todo: add X self alignment?
1525         (meta . ((class . Item)
1526                  (interfaces . (text-script-interface
1527                                 text-interface
1528                                 side-position-interface
1529                                 font-interface))))))
1530
1531     (TextSpanner
1532      . (
1533         (callbacks .((stencil . ,Text_spanner::print)))
1534         (font-shape . italic)
1535         (style . dashed-line)
1536         (staff-padding . 0.8)
1537         (dash-fraction . 0.2)
1538         (dash-period . 3.0)
1539         (direction . 1)
1540         (meta . ((class . Spanner)
1541                  (interfaces . (text-spanner-interface
1542                                 side-position-interface
1543                                 font-interface))))))
1544
1545     (Tie
1546      . (
1547         (callbacks . ((control-points . ,Tie::calc_control_points)
1548                       (direction . ,Tie::calc_direction)
1549                       (stencil . ,Tie::print)
1550                       ))
1551         (details . ((ratio . 0.333)
1552                     (height-limit . 1.0)
1553                     (between-length-limit . 1.0)))
1554         (thickness . 1.0)
1555         (meta . ((class . Spanner)
1556                  (interfaces . (tie-interface))))
1557         ))
1558
1559     (TieColumn
1560      . (
1561         (callbacks . ((positioning-done . ,Tie_column::calc_positioning_done)
1562                       (before-line-breaking . ,Tie_column::before_line_breaking)
1563                       ))
1564         (X-extent-callback . #f)
1565         (Y-extent-callback . #f)
1566         
1567         (meta . ((class . Spanner)
1568                  (interfaces . (tie-column-interface))))))
1569
1570     (TimeSignature
1571      . (
1572         (callbacks . ((stencil . ,Time_signature::print)))
1573         (break-align-symbol . time-signature)
1574         (break-visibility . ,all-visible)
1575         (space-alist . (
1576                         (first-note . (fixed-space . 2.0))
1577                         (right-edge . (extra-space . 0.5))
1578                         (staff-bar . (minimum-space . 2.0))))
1579         (breakable . #t)
1580         (style . C)
1581         (meta . ((class . Item)
1582                  (interfaces . (time-signature-interface
1583                                 break-aligned-interface
1584                                 font-interface))))))
1585
1586     (TrillSpanner
1587      . (
1588         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
1589         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1590                             ""))
1591         (style . trill)
1592         (staff-padding . 1.0)
1593         (padding . 0.5)
1594         (direction . 1)
1595         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1596         (meta . ((class . Spanner)
1597                  (interfaces . (text-spanner-interface
1598                                 side-position-interface
1599                                 font-interface))))))
1600
1601     (TrillPitchAccidental
1602      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1603         (padding . 0.2)
1604         (direction . ,LEFT)
1605         (font-size . -4)
1606         (callbacks . ((stencil . ,Accidental_interface::print)))
1607         (meta . ((class . Item)
1608                  (interfaces . (item-interface
1609                                 accidental-interface
1610                                 side-position-interface
1611                                 font-interface))))))
1612
1613     (TrillPitchGroup
1614      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1615         (axes . (,X))
1616         (font-size . -4)
1617         (callbacks . ((stencil . ,parenthesize-elements)))
1618         (direction . ,RIGHT)
1619         (padding . 0.3)
1620         (meta . ((class . Item)
1621                  (interfaces . (side-position-interface
1622                                 note-head-interface
1623                                 rhythmic-head-interface
1624                                 font-interface
1625                                 accidental-interface
1626                                 axis-group-interface))))))
1627
1628     (TrillPitchHead
1629      . ((callbacks . ((stencil . ,Note_head::print)))
1630         (duration-log . 2)
1631         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1632         (font-size . -4)
1633         (meta . ((class . Item)
1634                  (interfaces . (item-interface
1635                                 rhythmic-head-interface
1636                                 font-interface
1637                                 pitched-trill-interface
1638                                 ledgered-interface
1639                                 staff-symbol-referencer-interface))))))
1640
1641     (TupletBracket
1642      . (
1643         (padding . 1.1)
1644         (thickness . 1.6)
1645         (edge-height . (0.7 . 0.7))
1646         (shorten-pair . (-0.2 . -0.2))
1647         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
1648                       (positions . ,Tuplet_bracket::calc_positions)
1649                       (stencil . ,Tuplet_bracket::print)
1650                       ))
1651         (font-shape . italic)
1652
1653         (font-size . -2)
1654         (meta . ((class . Spanner)
1655                  (interfaces . (text-interface
1656                                 line-interface
1657                                 tuplet-bracket-interface
1658                                 font-interface))))))
1659
1660     (UnaCordaPedal
1661      . (
1662         (callbacks . ((stencil . ,Text_interface::print)))
1663         (font-shape . italic)
1664         (no-spacing-rods . #t)
1665         (self-alignment-X . 0)
1666         (direction . 1)
1667         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1668         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1669         (meta . ((class . Item)
1670                  (interfaces . (text-interface
1671                                 self-alignment-interface
1672                                 font-interface))))))
1673
1674     (UnaCordaPedalLineSpanner
1675      . (
1676         (axes . (1))
1677         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1678         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1679         (padding . 1.2)
1680         (staff-padding . 1.2)
1681         (minimum-space . 1.0)
1682         (direction . -1)
1683         (meta . ((class . Spanner)
1684                  (interfaces . (piano-pedal-interface
1685                                 axis-group-interface
1686                                 side-position-interface))))))
1687
1688     (VaticanaLigature
1689      . (
1690         (thickness . 0.6)
1691         (flexa-width . 2.0)
1692         (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1693         (callbacks . ((stencil . ,Vaticana_ligature::print)))
1694         (meta . ((class . Spanner)
1695                  (interfaces . (vaticana-ligature-interface
1696                                 font-interface))))))
1697
1698     (VerticalAlignment
1699      . (
1700         (axes . (1))
1701         (callbacks . ((positioning-done . ,Align_interface::calc_positioning_done)
1702                       (after-line-breaking . ,Align_interface::stretch_after_break)
1703                       ))
1704         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1705         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1706         (stacking-dir . -1)
1707         (meta . ((class . Spanner)
1708                  (interfaces . (align-interface
1709                                 axis-group-interface))))))
1710
1711     (VerticalAxisGroup
1712      . (
1713         (axes . (1))
1714         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1715         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1716
1717         (meta . ((class . Spanner)
1718                  (interfaces . (axis-group-interface
1719                                 vertically-spaceable-interface))))))
1720
1721     (VocalName
1722      . (
1723         (breakable . #t)
1724         (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
1725         (direction . 0)
1726         (space-alist . ((left-edge . (extra-space . 1.0))))
1727         (break-align-symbol . instrument-name)
1728         (callbacks . ((stencil . ,Text_interface::print)))
1729         (break-align-symbol . clef)
1730         (break-visibility . ,begin-of-line-visible)
1731         (baseline-skip . 2)
1732         (meta . ((class . Item)
1733                  (interfaces . (font-interface
1734                                 self-alignment-interface
1735                                 side-position-interface
1736                                 text-interface
1737                                 break-aligned-interface))))))
1738
1739     (VoltaBracket
1740      . (
1741         (callbacks . ((stencil . ,Volta_bracket_interface::print)
1742                       (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)))
1743         (direction . ,UP)
1744         (padding . 1)
1745         (font-encoding . fetaNumber)
1746         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1747         (thickness . 1.6)  ;;  linethickness
1748         (edge-height . (2.0 . 2.0)) ;; staffspace;
1749         (minimum-space . 5)
1750         (font-size . -4)
1751         (meta . ((class . Spanner)
1752                  (interfaces . (volta-bracket-interface
1753                                 horizontal-bracket-interface                            
1754                                 line-interface
1755                                 text-interface
1756                                 side-position-interface
1757                                 font-interface))))))
1758
1759     
1760     (VoiceFollower
1761      . (
1762         (style . line)
1763         (gap . 0.5)
1764         (breakable . #t)
1765         (X-extent-callback . #f)
1766         (Y-extent-callback . #f)
1767         
1768         (callbacks . ((stencil . ,Line_spanner::print)
1769                       (after-line-breaking . ,Line_spanner::after_line_breaking)))
1770         (meta . ((class . Spanner)
1771                  (interfaces . (line-spanner-interface
1772                                 line-interface))))))))
1773
1774 (define (completize-grob-entry x)
1775   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1776 "
1777   ;;  (display (car x))
1778   ;;  (newline)
1779   (let* ((name-sym  (car x))
1780          (grob-entry (cdr x))
1781          (meta-entry (cdr (assoc 'meta grob-entry)))
1782          (class (cdr (assoc 'class meta-entry)))
1783          (ifaces-entry
1784           (cdr (assoc 'interfaces meta-entry))))
1785
1786     (cond
1787      ((eq? 'Item class)
1788       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1789      ((eq? 'Spanner class)
1790       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1791      ((eq? 'Paper_column class)
1792       (set! ifaces-entry (cons 'item-interface
1793                                (cons 'paper-column-interface ifaces-entry))))
1794      ((eq? 'System class)
1795       (set! ifaces-entry (cons 'system-interface
1796                                (cons 'spanner-interface ifaces-entry))))
1797      (else
1798       (ly:warning "Unknown class ~a" class)))
1799     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1800
1801     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1802     (set! meta-entry (assoc-set! meta-entry 'interfaces
1803                                  ifaces-entry))
1804     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1805     (cons name-sym grob-entry)))
1806
1807 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1808
1809 ;;  (display (map pair? all-grob-descriptions))
1810
1811 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1812
1813 (map (lambda (x)
1814        ;; (display (car x)) (newline)
1815
1816        (set-object-property! (car x) 'translation-type? list?)
1817        (set-object-property! (car x) 'is-grob? #t))
1818      all-grob-descriptions)
1819
1820 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1821