]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
* Documentation/topdocs/NEWS.tely (Top): mention John Mandereau.
[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
26                        . ,Accidental_interface::after_line_breaking)
27                       ))
28         (meta . ((class . Item)
29                  (interfaces . (accidental-interface
30                                 font-interface))))))
31     
32     (AccidentalSuggestion
33      . ((callbacks . ((stencil . ,Accidental_interface::print)))
34         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent
35                                ,Self_alignment_interface::aligned_on_self))
36         (self-alignment-X . ,CENTER)
37         (cautionary . #t)
38         (cautionary-style . smaller)
39         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
40         (cautionary-style . parentheses)
41         (direction . ,UP)
42         (staff-padding . 0.25)
43         (script-priority . 0)
44         (meta . ((class . Item)
45                  (interfaces . (side-position-interface
46                                 script-interface
47                                 accidental-interface
48                                 accidental-suggestion-interface
49                                 self-alignment-interface
50                                 font-interface))))))
51     (AccidentalPlacement
52      . ((X-extent-callback . ,Axis_group_interface::group_extent_callback)
53         (left-padding . 0.2)
54         (callbacks . ((positioning-done . ,Accidental_placement::calc_positioning_done)
55                       ))
56         ;; this is quite small, but it is very ugly to have
57         ;; accs closer to the previous note than to the next one.
58         (right-padding . 0.15)
59         (meta . ((class . Item)
60                  (interfaces . (accidental-placement-interface))))))
61     (Ambitus
62      . (
63         (axes . (0 1))
64         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
65         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
66         (space-alist . (
67                         (clef . (extra-space . 0.5))
68                         (key-signature . (extra-space . 0.0))
69                         (staff-bar . (extra-space . 0.0))
70                         (time-signature . (extra-space . 0.0))
71                         (first-note . (fixed-space . 0.0))))
72         (breakable . #t)
73         (break-align-symbol . ambitus)
74         (break-visibility . ,begin-of-line-visible)
75         (meta . ((class . Item)
76                  (interfaces . (axis-group-interface
77                                 break-aligned-interface
78                                 ambitus-interface))))))
79
80     (AmbitusLine
81      . (
82         (callbacks . (  (stencil . ,Ambitus::print)))
83         (join-heads . #t)
84         (thickness . 2)
85         (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent))
86
87         (meta . ((class . Item)
88                  (interfaces . (ambitus-interface
89                                 staff-symbol-referencer-interface
90                                 font-interface))))))
91     (AmbitusAccidental
92      . (
93         (font-family . music)
94         (padding . 0.5)
95         (X-offset-callbacks . (,Side_position_interface::aligned_side))
96         (direction . -1)
97         (cautionary-style . parentheses)
98         (callbacks . ((stencil . ,Accidental_interface::print)
99                       (after-line-breaking . ,Accidental_interface::after_line_breaking)
100                       ))
101         (meta . ((class . Item)
102                  (interfaces . (item-interface
103                                 accidental-interface
104                                 break-aligned-interface
105                                 side-position-interface
106                                 font-interface))))))
107
108     (AmbitusNoteHead
109      . (
110         (duration-log . 2)
111         (callbacks . ((stencil . ,Note_head::print)
112                       (glyph-name . ,note-head::calc-glyph-name)
113                       ))
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         (layer . 0)
143         (break-visibility . ,all-visible)
144         (breakable . #t)
145         (callbacks . ((stencil . ,Bar_line::print)
146                       (glyph-name . ,bar-line::calc-glyph-name)
147                       (bar-size .  ,Bar_line::calc_bar_size)
148                       ))
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
273         ;; Whe have some unreferenced problems here.
274         ;;
275         ;; If we shorten beamed stems less than normal stems (1 staffspace),
276         ;; or high order less than 8th beams, patterns like
277         ;;     c''4 [c''8 c''] c''4 [c''16 c]
278         ;; are ugly (different stem lengths).
279         ;;
280         ;; But if we shorten 16th beams as much as 8th beams, a single
281         ;; forced 16th beam looks *very* short.
282
283         ;; We choose to shorten 8th beams the same as single stems,
284         ;; and high order beams less than 8th beams, so that all
285         ;; isolated shortened beams look nice and a bit shortened,
286         ;; sadly possibly breaking patterns with high order beams.
287         (beamed-stem-shorten . (1.0 0.5 0.25))
288         (damping . 1)
289         (auto-knee-gap . 5.5)
290
291         ;; only for debugging.
292         (font-family . roman)
293         (meta . ((class . Spanner)
294                  (interfaces . (staff-symbol-referencer-interface
295                                 beam-interface))))))
296
297     (BreakAlignment
298      . (
299         (breakable . #t)
300         (stacking-dir . 1)
301         (callbacks . ((positioning-done . ,Break_align_interface::calc_positioning_done)
302                       ))
303         (break-align-orders . ;; end of line
304                             #((instrument-name
305                                left-edge
306                                ambitus
307                                breathing-sign
308                                clef
309                                staff-bar
310                                key-cancellation
311                                key-signature
312                                time-signature
313                                custos)
314
315                               ;; unbroken
316                               (instrument-name
317                                left-edge
318                                ambitus
319                                breathing-sign
320                                clef
321                                staff-bar
322                                key-cancellation
323                                key-signature
324                                staff
325                                time-signature custos)
326                               
327                               ;; begin of line
328                               (instrument-name
329                                left-edge
330                                ambitus
331                                breathing-sign
332                                clef
333                                key-cancellation
334                                key-signature
335                                staff-bar
336                                time-signature
337                                custos)))
338         (axes . (0))
339         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
340         (meta . ((class . Item)
341                  (interfaces . (break-alignment-interface
342                                 axis-group-interface))))))
343
344     (BreakAlignGroup
345      . (
346         (axes . (0))
347         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
348         (meta . ((class . Item)
349                  (interfaces . (break-aligned-interface
350                                 axis-group-interface))))))
351
352     (BreathingSign
353      . (
354         (break-align-symbol . breathing-sign)
355         (breakable . #t)
356         (space-alist . (
357                         (ambitus . (extra-space . 2.0))
358                         (custos . (minimum-space . 1.0))
359                         (key-signature . (minimum-space . 1.5))
360                         (staff-bar . (minimum-space . 1.5))
361                         (clef . (minimum-space . 2.0))
362                         (first-note . (fixed-space . 1.0)) ;huh?
363                         (right-edge . (extra-space . 0.1))))
364         (callbacks . ((stencil . ,Text_interface::print)))
365         (text . ,(make-musicglyph-markup "scripts.rcomma"))
366         (Y-offset-callbacks . (,Breathing_sign::offset_callback))
367         (break-visibility . ,begin-of-line-invisible)
368         (meta . ((class . Item)
369                  (interfaces . (break-aligned-interface
370                                 breathing-sign-interface
371                                 text-interface
372                                 font-interface))))))
373
374     (Clef
375      . (
376         (callbacks . ((stencil . ,Clef::print)
377                       (glyph-name . ,Clef::calc_glyph_name)
378                       ))
379         (breakable . #t)
380         (font-family . music)
381         (break-align-symbol . clef)
382         (break-visibility . ,begin-of-line-visible)
383         (space-alist . ((ambitus . (extra-space . 2.0))
384                         (staff-bar . (extra-space . 0.7))
385                         (key-cancellation . (minimum-space . 4.0))
386                         (key-signature . (minimum-space . 4.0))
387                         (time-signature . (minimum-space . 4.2))
388                         (first-note . (minimum-fixed-space . 5.0))
389                         (next-note . (extra-space . 0.5))
390                         (right-edge . (extra-space . 0.5))))
391         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
392         (meta . ((class . Item)
393                  (interfaces . (clef-interface
394                                 staff-symbol-referencer-interface
395                                 font-interface
396                                 break-aligned-interface))))))
397
398     (ClusterSpannerBeacon
399      . (
400         (Y-extent-callback . ,Cluster_beacon::height)
401         (meta . ((class . Item)
402                  (interfaces . (cluster-beacon-interface))))))
403
404     (ClusterSpanner
405      . (
406         (callbacks . ((springs-and-rods . ,Spanner::set_spacing_rods)
407                       (stencil . ,Cluster::print)))
408         
409         (minimum-length . 0.0)
410         (padding . 0.25)
411         (style . ramp)
412         (meta . ((class . Spanner)
413                  (interfaces . (cluster-interface))))))
414
415     (ChordName
416      . (
417         (callbacks . ((stencil . ,Text_interface::print)
418                       (after-line-breaking . ,Chord_name::after_line_breaking)
419                       ))
420         (word-space . 0.0)
421         (font-family . sans)
422         (font-size . 1.5)
423         (meta . ((class . Item)
424                  (interfaces . (font-interface
425                                 rhythmic-grob-interface
426                                 text-interface
427                                 chord-name-interface
428                                 item-interface))))))
429
430     (CombineTextScript
431      . (
432         (callbacks . ((stencil . ,Text_interface::print)))
433         (no-spacing-rods . #t)
434         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
435         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
436         (direction . 1)
437         (padding . 0.5)
438         (staff-padding . 0.5)
439         (script-priority . 200)
440         ;; todo: add X self alignment?
441         (baseline-skip . 2)
442         (font-series . bold)
443         (meta . ((class . Item)
444                  (interfaces . (text-script-interface
445                                 text-interface
446                                 side-position-interface
447                                 font-interface))))))
448
449     (Custos
450      . (
451         (break-align-symbol . custos)
452         (breakable . #t)
453         (callbacks . ((stencil . ,Custos::print)))
454         (break-visibility . ,end-of-line-visible)
455         (style . vaticana)
456         (neutral-direction . -1)
457         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
458         (space-alist . (
459                         (first-note . (minimum-fixed-space . 0.0))
460                         (right-edge . (extra-space . 0.1))))
461         (meta . ((class . Item)
462                  (interfaces
463                   . (custos-interface
464                      staff-symbol-referencer-interface
465                      font-interface
466                      break-aligned-interface))))))
467
468     (DotColumn
469      . (
470         (axes . (0))
471         (direction . ,RIGHT)
472         (callbacks . ((positioning-done . ,Dot_column::calc_positioning_done) 
473                       ))
474         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
475         (X-offset-callbacks . (,Dot_column::side_position))
476         (meta . ((class . Item)
477                  (interfaces . (dot-column-interface
478                                 axis-group-interface))))))
479
480     (Dots
481      . (
482         (callbacks . ((stencil . ,Dots::print)))
483         (dot-count . 1)
484         (meta . ((class . Item)
485                  (interfaces . (font-interface
486                                 staff-symbol-referencer-interface
487                                 dots-interface))))))
488
489     (DoublePercentRepeat
490      . (
491         (callbacks . ((stencil . ,Percent_repeat_item_interface::double_percent)))
492         (breakable . #t)
493         (slope . 1.0)
494         (font-encoding . fetaMusic)
495         (width . 2.0)
496         (thickness . 0.48)
497         (break-align-symbol . staff-bar)
498         (break-visibility . ,begin-of-line-invisible)
499         (meta . ((class . Item)
500                  (interfaces . (font-interface
501                                 break-aligned-interface
502                                 percent-repeat-interface))))))
503
504     (DoublePercentRepeatCounter
505      . (
506         (callbacks . ((stencil . ,Text_interface::print)))
507         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
508                                ,Self_alignment_interface::centered_on_other_axis_parent))
509         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
510         (font-encoding . fetaNumber)
511         (self-alignment-X . 0)
512         (font-size . -2) 
513         (direction . 1)
514         (padding . 0.2)
515         (staff-padding . 0.25)
516         (meta . ((class . Item)
517                  (interfaces . (side-position-interface
518                                 self-alignment-interface
519                                 percent-repeat-interface
520                                 font-interface
521                                 text-interface))))))
522     (DynamicLineSpanner
523      . (
524         (axes . (1))
525         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
526         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
527         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
528         (staff-padding . 0.1)
529         (padding . 0.6)
530         (avoid-slur . outside)
531         (slur-padding . 0.3)
532         (minimum-space . 1.2)
533         (direction . -1)
534
535         (meta . ((class . Spanner)
536                  (interfaces . (axis-group-interface
537                                 dynamic-interface
538                                 dynamic-line-spanner-interface
539                                 side-position-interface))))))
540
541     (DynamicText
542      . (
543         
544         ;; todo.
545         (callbacks . ((stencil . ,Text_interface::print)
546                       (direction . ,Script_interface::calc_direction)))
547         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
548         (self-alignment-X . 0)
549         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
550         (self-alignment-Y . 0)
551         (font-series . bold)
552         (font-encoding . fetaDynamic)
553         (font-shape . italic)
554         (no-spacing-rods . #t)
555         (script-priority . 100)
556         (meta . ((class . Item)
557                  (interfaces . (font-interface
558                                 text-interface
559                                 self-alignment-interface
560                                 dynamic-interface
561                                 script-interface))))))
562
563     (DynamicTextSpanner
564      . (
565         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
566         ;; rather ugh with NCSB
567         ;; (font-series . bold)
568         (font-shape . italic)
569         (style . dashed-line)
570
571         ;; need to blend with dynamic texts.
572         (font-size . 1)
573         (bound-padding . 0.75)
574         (dash-fraction . 0.2)
575         (dash-period . 3.0)
576         (meta . ((class . Spanner)
577                  (interfaces . (font-interface
578                                 text-interface
579                                 dynamic-interface
580                                 dynamic-text-spanner-interface
581                                 spanner-interface))))))
582
583     (Fingering
584      . (
585
586         ;; sync with TextScript (?)
587
588         (padding . 0.5)
589         (avoid-slur . around)
590         (slur-padding . 0.2)
591         (staff-padding . 0.5)
592         (self-alignment-X . 0)
593         (self-alignment-Y . 0)
594         (script-priority . 100)
595         (callbacks . ((stencil . ,Text_interface::print)
596                       (direction . ,Script_interface::calc_direction)))
597         (font-encoding . fetaNumber)
598         (font-size . -5)                ; don't overlap when next to heads.
599         (meta . ((class . Item)
600                  (interfaces . (finger-interface
601                                 font-interface
602                                 text-script-interface
603                                 text-interface
604                                 side-position-interface
605                                 self-alignment-interface
606                                 item-interface))))))
607     (Glissando
608      . (
609         (style . line)
610         (gap . 0.5)
611         (zigzag-width . 0.75)
612         (breakable . #t)
613         (X-extent-callback . #f)
614         (Y-extent-callback . #f)
615         (callbacks . ((stencil . ,Line_spanner::print)
616                       (after-line-breaking . ,Line_spanner::after_line_breaking)
617                       ))
618         
619         (meta . ((class . Spanner)
620                  (interfaces . (line-interface
621                                 line-spanner-interface))))))
622
623     (GridPoint
624      . (
625         (X-extent . (0 . 0))
626         (Y-extent . (0 . 0))
627         (meta . ((class . Item)
628                  (interfaces . (grid-point-interface))))))
629
630     (GridLine
631      . (
632         (callbacks . (stencil . ,Grid_line_interface::print))
633         (X-extent-callback  . ,Grid_line_interface::width_callback)
634         (self-alignment-X . ,CENTER)
635         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
636                                ,Self_alignment_interface::centered_on_parent))
637         (layer . 0)
638         (meta . ((class . Item)
639                  (interfaces . (self-alignment-interface
640                                 grid-line-interface))))))
641
642     (Hairpin
643      . (
644         
645         (callbacks . ((stencil . ,Hairpin::print)
646                       (springs-and-rods . ,Spanner::set_spacing_rods)
647                       (after-line-breaking . ,Hairpin::after_line_breaking)))
648         (thickness . 1.0)
649         (height . 0.6666)
650         (minimum-length . 2.0)
651         (bound-padding . 1.0)
652         (self-alignment-Y . 0)
653         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
654         (meta . ((class . Spanner)
655                  (interfaces . (hairpin-interface
656                                 line-interface
657                                 self-alignment-interface
658                                 dynamic-interface
659                                 spanner-interface))))))
660
661     (HorizontalBracket
662      . (
663         (thickness . 1.0)
664         (callbacks . ((stencil . ,Horizontal_bracket::print)))
665         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
666         (padding . 0.2)
667         (staff-padding . 0.2)
668         (direction . -1)
669         (bracket-flare . (0.5 . 0.5))
670         (meta . ((class . Spanner)
671                  (interfaces . (horizontal-bracket-interface
672                                 side-position-interface
673                                 line-interface
674                                 spanner-interface))))))
675     (InstrumentName
676      . (
677         (breakable . #t)
678         (Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self
679                                ,Side_position_interface::aligned_on_support_refpoints))
680         ;; This direction is for aligned_on_support_refpoints
681         ;; (?) --hwn
682         (direction . 0)
683         (space-alist . (
684                         (left-edge . (extra-space . 1.0))))
685
686         (self-alignment-Y . 0)
687         (callbacks . ((stencil . ,Text_interface::print)))
688         (break-align-symbol . instrument-name)
689         (break-visibility . ,begin-of-line-visible)
690         (baseline-skip . 2)
691         (meta . ((class . Item)
692                  (interfaces . (font-interface
693                                 self-alignment-interface
694                                 side-position-interface
695                                 text-interface
696                                 break-aligned-interface))))))
697
698     (KeyCancellation
699      . (
700         (callbacks . ((stencil . ,Key_signature_interface::print)))
701         (space-alist . (
702                         (time-signature . (extra-space . 1.25))
703                         (staff-bar . (extra-space . 0.6))
704                         (key-signature . (extra-space . 0.5))
705                         (right-edge . (extra-space . 0.5))
706                         (first-note . (fixed-space . 2.5))))
707         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
708         (break-align-symbol . key-cancellation)
709         (break-visibility . ,begin-of-line-invisible)
710         (breakable . #t)
711
712         (meta . ((class . Item)
713                  (interfaces . (key-signature-interface
714                                 font-interface
715                                 break-aligned-interface))))))
716     (KeySignature
717      . (
718         (callbacks . ((stencil . ,Key_signature_interface::print)))
719         (space-alist . (
720                         (time-signature . (extra-space . 1.25))
721                         (staff-bar . (extra-space . 1.1))
722                         (right-edge . (extra-space . 0.5))
723                         (first-note . (fixed-space . 2.5))))
724         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
725         (break-align-symbol . key-signature)
726         (break-visibility . ,begin-of-line-visible)
727         (breakable . #t)
728
729         (meta . ((class . Item)
730                  (interfaces . (key-signature-interface
731                                 font-interface
732                                 break-aligned-interface))))))
733     (LaissezVibrerTie
734      . (
735         (callbacks . ((stencil  . ,Tie::print)
736                       (control-points . ,Laissez_vibrer_tie::calc_control_points)
737                       (direction . ,Laissez_vibrer_tie::calc_direction)
738                       ))
739         (details . ((ratio . 0.333)
740                     (height-limit . 1.0)))
741         (thickness . 1.0)
742         (meta . ((class . Item)
743                  (interfaces . (laissez-vibrer-tie-interface))
744                  ))
745         ))
746     
747     (LaissezVibrerTieColumn
748      . (
749         (X-extent-callback . #f)
750         (Y-extent-callback . #f)
751         (callbacks . ((positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
752                       ))
753         (meta . ((class . Item)
754                  (interfaces . (laissez-vibrer-tie-column-interface))
755                  ))
756         ))
757     
758     (LedgerLineSpanner
759      . (
760         (callbacks . ((springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
761                       
762                       (stencil . ,Ledger_line_spanner::print)))
763         (X-extent-callback . #f)
764         (Y-extent-callback . #f)
765         (minimum-length-fraction . 0.25)
766         (length-fraction . 0.25)
767         (layer . 0)
768         (meta . ((class . Spanner)
769                  (interfaces . (ledger-line-interface))))))
770
771     (LeftEdge
772      . (
773         (break-align-symbol . left-edge)
774         (X-extent . (0 . 0))
775         (breakable . #t)
776         (break-visibility . ,center-invisible)
777         (space-alist . (
778                         (custos . (extra-space . 0.0))
779                         (ambitus . (extra-space . 2.0))
780                         (time-signature . (extra-space . 1.0))
781                         (staff-bar . (extra-space . 0.0))
782                         (breathing-sign . (minimum-space . 0.0))
783                         (clef . (extra-space . 0.8))
784                         (first-note . (fixed-space . 2.0))
785                         (right-edge . (extra-space . 0.0))
786                         (key-signature . (extra-space . 0.0))
787                         (key-cancellation . (extra-space . 0.0))
788                         ))
789         (meta . ((class . Item)
790                  (interfaces . (break-aligned-interface))))))
791
792     (LigatureBracket
793      . (
794         (ligature-primitive-callback . ,Note_head::print)
795         
796         ;; ugh.  A ligature bracket is totally different from
797         ;; a tuplet bracket.
798         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
799                       (positions . ,Tuplet_bracket::calc_positions)
800                       (stencil . ,Tuplet_bracket::print)
801                       ))
802         (direction . 1)
803         (gap . 0.0)
804         (padding . 2.0)
805         (thickness . 1.6)
806         (edge-height . (0.7 . 0.7))
807         (shorten-pair . (-0.2 . -0.2))
808         (meta . ((class . Spanner)
809                  (interfaces . (tuplet-bracket-interface
810                                 line-interface))))))
811
812     (LyricHyphen
813      . (
814         (thickness . 1.3)
815         (height . 0.42)
816         (dash-period . 10.0)
817         (length . 0.66)
818         (minimum-length . 0.3)
819         (padding . 0.07)
820                                         ;       (springs-and-rods . ,Hyphen_spanner::set_spacing_rods)
821         (callbacks . ((stencil . ,Hyphen_spanner::print)))
822         (Y-extent . (0 . 0))
823         (meta . ((class . Spanner)
824                  (interfaces . (lyric-interface
825                                 lyric-hyphen-interface
826                                 spanner-interface))))))
827
828     (LyricExtender
829      . (
830         (callbacks . ((stencil . ,Lyric_extender::print)))
831         (thickness . 0.8) ; linethickness
832         (minimum-length . 1.5)
833         (Y-extent . (0 . 0))
834         (meta . ((class . Spanner)
835                  (interfaces . (lyric-interface
836                                 lyric-extender-interface))))))
837
838     (LyricText
839      . ((callbacks . ((stencil . ,Text_interface::print)))
840         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
841         (self-alignment-X . 0)
842         (word-space . 0.6)
843         (font-series . bold-narrow)
844         (font-size . 1.0)
845         (meta . ((class . Item)
846                  (interfaces . (rhythmic-grob-interface
847                                 lyric-syllable-interface
848                                 self-alignment-interface
849                                 text-interface
850                                 font-interface))))))
851
852     (MensuralLigature
853      . (
854         (thickness . 1.4)
855         (flexa-width . 2.0)
856         (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
857         (callbacks . ((stencil . ,Mensural_ligature::print)))
858         (meta . ((class . Spanner)
859                  (interfaces . (mensural-ligature-interface
860                                 font-interface))))))
861
862     (MetronomeMark
863      . (
864         (callbacks . ((stencil . ,Text_interface::print)))
865         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
866         (direction . 1)
867         (padding . 0.8)
868         (meta . ((class . Item)
869                  (interfaces . (text-interface
870                                 side-position-interface
871                                 font-interface
872                                 metronome-mark-interface))))))
873     (MeasureGrouping
874      . (
875         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
876         (callbacks . ((stencil . ,Measure_grouping::print)))
877         (padding . 2)
878         (direction . 1)
879         (thickness . 1)
880         (height . 2.0)
881         (staff-padding . 3)
882         (meta . ((class . Spanner)
883                  (interfaces . (side-position-interface
884                                 measure-grouping-interface))))))
885     (MultiMeasureRest
886      . (
887         (callbacks . ((stencil . ,Multi_measure_rest::print)))
888         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
889         (staff-position . 0)
890         (expand-limit . 10)
891         (thick-thickness . 6.6)
892         (hair-thickness . 2.0)
893         (padding . 1)
894         (meta . ((class . Spanner)
895                  (interfaces . (multi-measure-rest-interface
896                                 multi-measure-interface
897                                 rest-interface
898                                 font-interface
899                                 staff-symbol-referencer-interface))))))
900
901     (MultiMeasureRestNumber
902      . (
903         (callbacks . ((springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
904                       (stencil . ,Text_interface::print)))
905         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
906                                ,Self_alignment_interface::centered_on_other_axis_parent))
907         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
908         (self-alignment-X . 0)
909         (direction . 1)
910         (padding . 0.4)
911         (staff-padding . 0.4)
912         (font-encoding . fetaNumber)
913         (meta . ((class . Spanner)
914                  (interfaces . (side-position-interface
915                                 multi-measure-interface
916                                 self-alignment-interface
917                                 font-interface
918                                 text-interface))))))
919     
920     (MultiMeasureRestText
921      . (
922         (callbacks . ((stencil . ,Text_interface::print)))
923         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
924                                ,Self_alignment_interface::centered_on_other_axis_parent))
925         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
926         (self-alignment-X . 0)
927         (direction . 1)
928         (padding . 0.2)
929         (staff-padding . 0.25)
930         (meta . ((class . Spanner)
931                  (interfaces . (side-position-interface
932                                 multi-measure-interface
933                                 self-alignment-interface
934                                 font-interface
935                                 text-interface))))))
936
937     (NoteCollision
938      . (
939         (axes . (0 1))
940         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
941         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
942         (callbacks . ((positioning-done . ,Note_collision_interface::calc_positioning_done)
943                       ))
944         (meta . ((class . Item)
945                  (interfaces . (note-collision-interface
946                                 axis-group-interface))))))
947
948     (NoteColumn
949      . (
950         (axes . (0 1))
951         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
952         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
953         (meta . ((class . Item)
954                  (interfaces . (axis-group-interface
955                                 note-column-interface))))))
956
957     (NoteHead
958      . (
959         (callbacks . ((stencil . ,Note_head::print)
960                       (stem-attachment . ,Note_head::calc_stem_attachment)
961                       (glyph-name . ,note-head::calc-glyph-name) 
962                       ))
963
964         ;; WTF is this? 
965         (ligature-primitive-callback . ,Note_head::print)
966         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
967         (X-offset-callbacks . (,Note_head::stem_x_shift))
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                       (springs-and-rods . ,Spanner::set_spacing_rods)
1057                       (stencil . ,Slur::print)                
1058                       ))
1059         
1060         (thickness . 1.1)
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         (callbacks . ((springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
1088                       (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                       (direction . ,Script_interface::calc_direction)))
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         (callbacks . ((springs-and-rods . ,Separating_group_spanner::set_spacing_rods)
1229                       ))
1230         (meta . ((class . Spanner)
1231                  (interfaces . (only-prebreak-interface
1232                                 spacing-interface
1233                                 separation-spanner-interface))))))
1234
1235     (Slur
1236      . ((slur-details . ,default-slur-details)
1237         (callbacks . ((control-points . ,Slur::calc_control_points)
1238                       (direction . ,Slur::calc_direction)
1239                       (springs-and-rods . ,Spanner::set_spacing_rods)
1240                       (stencil . ,Slur::print)
1241                       ))
1242         (thickness . 1.0)
1243         (minimum-length . 1.5)
1244         (Y-extent-callback . ,Slur::height)
1245                                         ; Slur::height)
1246         (height-limit . 2.0)
1247         (ratio . 0.25)
1248         (meta . ((class . Spanner)
1249                  (interfaces . (slur-interface))))))
1250
1251     (SpacingSpanner
1252      . (
1253         (callbacks . ((springs-and-rods . ,Spacing_spanner::set_springs)))
1254         (grace-space-factor . 0.6)
1255         (shortest-duration-space . 2.0)
1256         (spacing-increment . 1.2)
1257         (base-shortest-duration . ,(ly:make-moment 3 16))
1258         (meta . ((class . Spanner)
1259                  (interfaces . (spacing-interface
1260                                 spacing-spanner-interface))))))
1261
1262     (SpanBar
1263      . (
1264         (break-align-symbol . staff-bar)
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                       (bar-size . ,Span_bar::calc_bar_size)
1271                       (glyph-name . ,Span_bar::calc_glyph_name)
1272                       (before-line-breaking . ,Span_bar::before_line_breaking)))
1273         ;; ugh duplication!
1274
1275         ;;
1276         ;; Ross. page 151 lists other values, we opt for a leaner look
1277         ;;
1278         (kern . 3.0)
1279         (thin-kern . 3.0)
1280         (hair-thickness . 1.6)
1281         (thick-thickness . 6.0)
1282         (meta . ((class . Item)
1283                  (interfaces . (span-bar-interface
1284                                 font-interface
1285                                 bar-line-interface))))))
1286
1287     (StanzaNumber
1288      . ((callbacks . ((stencil . ,Text_interface::print)))
1289         (font-series . bold)
1290         (padding . 1.0)
1291         (X-offset-callbacks . (,Side_position_interface::aligned_side))
1292         (direction . ,LEFT)
1293         (meta . ((class . Item)
1294                  (interfaces . (side-position-interface
1295                                 stanza-number-interface
1296                                 text-interface
1297                                 font-interface))))))
1298
1299     (StringNumber
1300      . (
1301         (callbacks . ((stencil . ,print-circled-text-callback)))
1302         (padding . 0.5)
1303         (staff-padding . 0.5)
1304         (self-alignment-X . 0)
1305         (self-alignment-Y . 0)
1306         (script-priority . 100)
1307         (font-encoding . fetaNumber)
1308         (font-size . -5)                ; don't overlap when next to heads.
1309         (meta . ((class . Item)
1310                  (interfaces . (string-number-interface
1311                                 font-interface
1312                                 text-script-interface
1313                                 text-interface
1314                                 side-position-interface
1315                                 self-alignment-interface
1316                                 item-interface))))))
1317
1318     (StaffSpacing
1319      . (
1320         (breakable . #t)
1321         (stem-spacing-correction . 0.4)
1322         (meta . ((class . Item)
1323                  (interfaces . (spacing-interface
1324                                 staff-spacing-interface))))))
1325
1326     (SostenutoPedal
1327      . (
1328         (callbacks . ((stencil . ,Text_interface::print)))
1329         (direction . 1)
1330         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1331         (no-spacing-rods . #t)
1332         (padding . 0.0) ;; padding relative to SostenutoPedalLineSpanner
1333         (font-shape . italic)
1334         (self-alignment-X . 0)
1335         (meta . ((class . Item)
1336                  (interfaces . (text-interface
1337                                 self-alignment-interface
1338                                 font-interface))))))
1339
1340     (SostenutoPedalLineSpanner
1341      . (
1342         (axes . (1))
1343         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1344         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1345
1346         (padding . 1.2)
1347         (minimum-space . 1.0)
1348         (direction . -1)
1349         (meta . ((class . Spanner)
1350                  (interfaces . (piano-pedal-interface
1351                                 axis-group-interface
1352                                 side-position-interface))))))
1353
1354     (StaffSymbol
1355      . (
1356         (callbacks . ((stencil . ,Staff_symbol::print)))
1357         (line-count . 5)
1358         (ledger-line-thickness . (1.0 . 0.1))
1359         (layer . 0)
1360         (meta . ((class . Spanner)
1361                  (interfaces . (staff-symbol-interface))))))
1362
1363     (Stem
1364      . (
1365         ;; this list is rather long. Trim --hwn
1366         (callbacks . ((direction . ,Stem::calc_direction)
1367                       (stem-end-position . ,Stem::calc_stem_end_position)
1368                       (stem-info . ,Stem::calc_stem_info)
1369                       (positioning-done . ,Stem::calc_positioning_done)
1370                       (stencil . ,Stem::print)
1371                       (length . ,Stem::calc_length)
1372                       ))
1373         (thickness . 1.3)
1374
1375         (details
1376          . (
1377             ;; 3.5 (or 3 measured from note head) is standard length
1378             ;; 32nd, 64th flagged stems should be longer
1379             (lengths . (3.5 3.5 3.5 4.5 5.0))
1380
1381             ;; FIXME.  3.5 yields too long beams (according to Ross and
1382             ;; looking at Baerenreiter examples) for a number of common
1383             ;; boundary cases.  Subtracting half a beam thickness fixes
1384             ;; this, but the bug may well be somewhere else.
1385
1386             ;; FIXME this should come from 'lengths
1387             (beamed-lengths . (3.26 3.5 3.6))
1388
1389             ;; The 'normal' minima
1390             (beamed-minimum-free-lengths . (1.83 1.5 1.25))
1391                                         ;(beamed-minimum-free-lengths . (2.0 1.83 1.25))
1392
1393             ;; The 'extreme case' minima
1394             (beamed-extreme-minimum-free-lengths . (2.0 1.25))
1395
1396             ;; Stems in unnatural (forced) direction should be shortened by
1397             ;; one staff space, according to [Roush & Gourlay].
1398             ;; Flagged stems we shorten only half a staff space.
1399             (stem-shorten . (1.0 0.5))
1400
1401             ))
1402         
1403
1404         ;; default stem direction for note on middle line
1405         (neutral-direction . -1)
1406
1407         ;; We use the normal minima as minimum for the ideal lengths,
1408         ;; and the extreme minima as abolute minimum length.
1409
1410         (X-offset-callbacks . (,Stem::offset_callback))
1411         (X-extent-callback . ,Stem::width_callback)
1412         (Y-extent-callback . ,Stem::height)
1413         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1414         (meta . ((class . Item)
1415                  (interfaces . (stem-interface
1416                                 font-interface))))))
1417
1418     (StemTremolo
1419      . (
1420         (callbacks . ((stencil . ,Stem_tremolo::print)))
1421         (Y-extent-callback . ,Stem_tremolo::height)
1422         (X-extent-callback . #f)
1423
1424         (beam-width . 1.6) ; staff-space
1425         (beam-thickness . 0.48) ; staff-space
1426         (meta . ((class . Item)
1427                  (interfaces . (stem-tremolo-interface))))))
1428
1429     (SustainPedal
1430      . (
1431         (no-spacing-rods . #t)
1432         (callbacks . ((stencil . ,Sustain_pedal::print)))
1433         (self-alignment-X . 0)
1434         (direction . 1)
1435         (padding . 0.0)  ;; padding relative to SustainPedalLineSpanner
1436         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1437         (meta . ((class . Item)
1438                  (interfaces . (piano-pedal-interface
1439                                 text-spanner-interface
1440                                 text-interface
1441                                 self-alignment-interface
1442                                 font-interface))))))
1443
1444     (SustainPedalLineSpanner
1445      . (
1446         (axes . (1))
1447         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1448         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1449
1450         (padding . 1.2)
1451         (staff-padding . 1.2)
1452         (minimum-space . 1.0)
1453         (direction . -1)
1454         (meta . ((class . Spanner)
1455                  (interfaces . (piano-pedal-interface
1456                                 axis-group-interface
1457                                 side-position-interface))))))
1458
1459     (System
1460      . (
1461         (axes . (0 1))
1462         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1463         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1464         (meta . ((class . System)
1465                  (interfaces . (system-interface
1466                                 axis-group-interface))))))
1467
1468     (SystemStartBrace
1469      . (
1470         (glyph . "brace")
1471         (callbacks . ((stencil . ,System_start_delimiter::print)))
1472         (collapse-height . 5.0)
1473         (font-encoding . fetaBraces)
1474         (Y-extent-callback . #f)
1475         (meta . ((class . Spanner)
1476                  (interfaces . (system-start-delimiter-interface
1477                                 font-interface))))))
1478
1479     (SystemStartBracket
1480      . (
1481         (Y-extent-callback . #f)
1482         (X-offset-callbacks . (,(lambda (g a) -0.8)))
1483         (callbacks . ((stencil . ,System_start_delimiter::print)))
1484         (glyph . "bracket")
1485         (collapse-height . 5.0)
1486         (thickness . 0.45)
1487         (meta . ((class . Spanner)
1488                  (interfaces . (font-interface
1489                                 system-start-delimiter-interface))))))
1490
1491     (SystemStartBar
1492      . (
1493         (Y-extent-callback . #f)
1494         (glyph . "bar-line")
1495         (thickness . 1.6)
1496         (callbacks . ((stencil . ,System_start_delimiter::print)
1497                       ))
1498         (meta . ((class . Spanner)
1499                  (interfaces . (system-start-delimiter-interface))))))
1500
1501     (TabNoteHead
1502      . (
1503         (callbacks . ((stencil . ,Text_interface::print)))
1504         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1505         (font-size . -2)
1506         (stem-attachment . (1.0 . 1.35))
1507         (font-series . bold)
1508         (meta . ((class . Item)
1509                  (interfaces
1510                   . (rhythmic-head-interface
1511                      font-interface
1512                      note-head-interface
1513                      staff-symbol-referencer-interface
1514                      text-interface))))))
1515
1516     (TextScript
1517      . (
1518         (no-spacing-rods . #t)
1519         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1520         (direction . -1)
1521
1522         ;; sync with Fingering ?
1523         (padding . 0.5)
1524         (staff-padding . 0.5)
1525         (callbacks . ((stencil . ,Text_interface::print)
1526                       (direction . ,Script_interface::calc_direction)))
1527         (avoid-slur . around)
1528         (slur-padding . 0.5)
1529         (script-priority . 200)
1530         ;; todo: add X self alignment?
1531         (meta . ((class . Item)
1532                  (interfaces . (text-script-interface
1533                                 text-interface
1534                                 side-position-interface
1535                                 font-interface))))))
1536
1537     (TextSpanner
1538      . (
1539         (callbacks .((stencil . ,Text_spanner::print)))
1540         (font-shape . italic)
1541         (style . dashed-line)
1542         (staff-padding . 0.8)
1543         (dash-fraction . 0.2)
1544         (dash-period . 3.0)
1545         (direction . 1)
1546         (meta . ((class . Spanner)
1547                  (interfaces . (text-spanner-interface
1548                                 side-position-interface
1549                                 font-interface))))))
1550
1551     (Tie
1552      . (
1553         (callbacks . ((control-points . ,Tie::calc_control_points)
1554                       (direction . ,Tie::calc_direction)
1555                       (stencil . ,Tie::print)
1556                       ))
1557         (details . ((ratio . 0.333)
1558                     (height-limit . 1.0)
1559                     (between-length-limit . 1.0)))
1560         (thickness . 1.0)
1561         (meta . ((class . Spanner)
1562                  (interfaces . (tie-interface))))
1563         ))
1564
1565     (TieColumn
1566      . (
1567         (callbacks . ((positioning-done . ,Tie_column::calc_positioning_done)
1568                       (before-line-breaking . ,Tie_column::before_line_breaking)
1569                       ))
1570         (X-extent-callback . #f)
1571         (Y-extent-callback . #f)
1572         
1573         (meta . ((class . Spanner)
1574                  (interfaces . (tie-column-interface))))))
1575
1576     (TimeSignature
1577      . (
1578         (callbacks . ((stencil . ,Time_signature::print)))
1579         (break-align-symbol . time-signature)
1580         (break-visibility . ,all-visible)
1581         (space-alist . (
1582                         (first-note . (fixed-space . 2.0))
1583                         (right-edge . (extra-space . 0.5))
1584                         (staff-bar . (minimum-space . 2.0))))
1585         (breakable . #t)
1586         (style . C)
1587         (meta . ((class . Item)
1588                  (interfaces . (time-signature-interface
1589                                 break-aligned-interface
1590                                 font-interface))))))
1591
1592     (TrillSpanner
1593      . (
1594         (callbacks . ((stencil . ,Dynamic_text_spanner::print)))
1595         (edge-text . ,(cons (make-musicglyph-markup "scripts.trill")
1596                             ""))
1597         (style . trill)
1598         (staff-padding . 1.0)
1599         (padding . 0.5)
1600         (direction . 1)
1601         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1602         (meta . ((class . Spanner)
1603                  (interfaces . (text-spanner-interface
1604                                 side-position-interface
1605                                 font-interface))))))
1606
1607     (TrillPitchAccidental
1608      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1609         (padding . 0.2)
1610         (direction . ,LEFT)
1611         (font-size . -4)
1612         (callbacks . ((stencil . ,Accidental_interface::print)))
1613         (meta . ((class . Item)
1614                  (interfaces . (item-interface
1615                                 accidental-interface
1616                                 side-position-interface
1617                                 font-interface))))))
1618
1619     (TrillPitchGroup
1620      . ((X-offset-callbacks . (,Side_position_interface::aligned_side))
1621         (axes . (,X))
1622         (font-size . -4)
1623         (callbacks . ((stencil . ,parenthesize-elements)))
1624         (direction . ,RIGHT)
1625         (padding . 0.3)
1626         (meta . ((class . Item)
1627                  (interfaces . (side-position-interface
1628                                 note-head-interface
1629                                 rhythmic-head-interface
1630                                 font-interface
1631                                 accidental-interface
1632                                 axis-group-interface))))))
1633
1634     (TrillPitchHead
1635      . ((callbacks . ((stencil . ,Note_head::print)))
1636         (duration-log . 2)
1637         (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
1638         (font-size . -4)
1639         (meta . ((class . Item)
1640                  (interfaces . (item-interface
1641                                 rhythmic-head-interface
1642                                 font-interface
1643                                 pitched-trill-interface
1644                                 ledgered-interface
1645                                 staff-symbol-referencer-interface))))))
1646
1647     (TupletBracket
1648      . (
1649         (padding . 1.1)
1650         (thickness . 1.6)
1651         (edge-height . (0.7 . 0.7))
1652         (shorten-pair . (-0.2 . -0.2))
1653         (callbacks . ((direction  . ,Tuplet_bracket::calc_direction)
1654                       (positions . ,Tuplet_bracket::calc_positions)
1655                       (stencil . ,Tuplet_bracket::print)
1656                       ))
1657         (font-shape . italic)
1658
1659         (font-size . -2)
1660         (meta . ((class . Spanner)
1661                  (interfaces . (text-interface
1662                                 line-interface
1663                                 tuplet-bracket-interface
1664                                 font-interface))))))
1665
1666     (UnaCordaPedal
1667      . (
1668         (callbacks . ((stencil . ,Text_interface::print)))
1669         (font-shape . italic)
1670         (no-spacing-rods . #t)
1671         (self-alignment-X . 0)
1672         (direction . 1)
1673         (padding . 0.0)  ;; padding relative to UnaCordaPedalLineSpanner
1674         (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
1675         (meta . ((class . Item)
1676                  (interfaces . (text-interface
1677                                 self-alignment-interface
1678                                 font-interface))))))
1679
1680     (UnaCordaPedalLineSpanner
1681      . (
1682         (axes . (1))
1683         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1684         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1685         (padding . 1.2)
1686         (staff-padding . 1.2)
1687         (minimum-space . 1.0)
1688         (direction . -1)
1689         (meta . ((class . Spanner)
1690                  (interfaces . (piano-pedal-interface
1691                                 axis-group-interface
1692                                 side-position-interface))))))
1693
1694     (VaticanaLigature
1695      . (
1696         (thickness . 0.6)
1697         (flexa-width . 2.0)
1698         (ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
1699         (callbacks . ((stencil . ,Vaticana_ligature::print)))
1700         (meta . ((class . Spanner)
1701                  (interfaces . (vaticana-ligature-interface
1702                                 font-interface))))))
1703
1704     (VerticalAlignment
1705      . (
1706         (axes . (1))
1707         (callbacks . ((positioning-done . ,Align_interface::calc_positioning_done)
1708                       (after-line-breaking . ,Align_interface::stretch_after_break)
1709                       ))
1710         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1711         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1712         (stacking-dir . -1)
1713         (meta . ((class . Spanner)
1714                  (interfaces . (align-interface
1715                                 axis-group-interface))))))
1716
1717     (VerticalAxisGroup
1718      . (
1719         (axes . (1))
1720         (Y-extent-callback . ,Axis_group_interface::group_extent_callback)
1721         (X-extent-callback . ,Axis_group_interface::group_extent_callback)
1722
1723         (meta . ((class . Spanner)
1724                  (interfaces . (axis-group-interface
1725                                 vertically-spaceable-interface))))))
1726
1727     (VocalName
1728      . (
1729         (breakable . #t)
1730         (Y-offset-callbacks . (,Side_position_interface::aligned_on_support_refpoints))
1731         (direction . 0)
1732         (space-alist . ((left-edge . (extra-space . 1.0))))
1733         (break-align-symbol . instrument-name)
1734         (callbacks . ((stencil . ,Text_interface::print)))
1735         (break-align-symbol . clef)
1736         (break-visibility . ,begin-of-line-visible)
1737         (baseline-skip . 2)
1738         (meta . ((class . Item)
1739                  (interfaces . (font-interface
1740                                 self-alignment-interface
1741                                 side-position-interface
1742                                 text-interface
1743                                 break-aligned-interface))))))
1744
1745     (VoltaBracket
1746      . (
1747         (callbacks . ((stencil . ,Volta_bracket_interface::print)
1748                       (after-line-breaking . ,Volta_bracket_interface::after_line_breaking)))
1749         (direction . ,UP)
1750         (padding . 1)
1751         (font-encoding . fetaNumber)
1752         (Y-offset-callbacks . (,Side_position_interface::aligned_side))
1753         (thickness . 1.6)  ;;  linethickness
1754         (edge-height . (2.0 . 2.0)) ;; staffspace;
1755         (minimum-space . 5)
1756         (font-size . -4)
1757         (meta . ((class . Spanner)
1758                  (interfaces . (volta-bracket-interface
1759                                 horizontal-bracket-interface                            
1760                                 line-interface
1761                                 text-interface
1762                                 side-position-interface
1763                                 font-interface))))))
1764
1765     
1766     (VoiceFollower
1767      . (
1768         (style . line)
1769         (gap . 0.5)
1770         (breakable . #t)
1771         (X-extent-callback . #f)
1772         (Y-extent-callback . #f)
1773         
1774         (callbacks . ((stencil . ,Line_spanner::print)
1775                       (after-line-breaking . ,Line_spanner::after_line_breaking)))
1776         (meta . ((class . Spanner)
1777                  (interfaces . (line-spanner-interface
1778                                 line-interface))))))))
1779
1780 (define (completize-grob-entry x)
1781   "Transplant assoc key into 'name entry of 'meta of X.  Set interfaces for Item, Spanner etc.
1782 "
1783   ;;  (display (car x))
1784   ;;  (newline)
1785   (let* ((name-sym  (car x))
1786          (grob-entry (cdr x))
1787          (meta-entry (cdr (assoc 'meta grob-entry)))
1788          (class (cdr (assoc 'class meta-entry)))
1789          (ifaces-entry
1790           (cdr (assoc 'interfaces meta-entry))))
1791
1792     (cond
1793      ((eq? 'Item class)
1794       (set! ifaces-entry (cons 'item-interface ifaces-entry)))
1795      ((eq? 'Spanner class)
1796       (set! ifaces-entry (cons 'spanner-interface ifaces-entry)))
1797      ((eq? 'Paper_column class)
1798       (set! ifaces-entry (cons 'item-interface
1799                                (cons 'paper-column-interface ifaces-entry))))
1800      ((eq? 'System class)
1801       (set! ifaces-entry (cons 'system-interface
1802                                (cons 'spanner-interface ifaces-entry))))
1803      (else
1804       (ly:warning "Unknown class ~a" class)))
1805     (set! ifaces-entry (cons 'grob-interface ifaces-entry))
1806
1807     (set! meta-entry (assoc-set! meta-entry 'name name-sym))
1808     (set! meta-entry (assoc-set! meta-entry 'interfaces
1809                                  ifaces-entry))
1810     (set! grob-entry (assoc-set! grob-entry 'meta meta-entry))
1811     (cons name-sym grob-entry)))
1812
1813 (set! all-grob-descriptions (map completize-grob-entry all-grob-descriptions))
1814
1815 ;;  (display (map pair? all-grob-descriptions))
1816
1817 ;; make sure that \property Foo.Bar =\turnOff doesn't complain
1818
1819 (map (lambda (x)
1820        ;; (display (car x)) (newline)
1821
1822        (set-object-property! (car x) 'translation-type? list?)
1823        (set-object-property! (car x) 'is-grob? #t))
1824      all-grob-descriptions)
1825
1826 (set! all-grob-descriptions (sort all-grob-descriptions alist<?))
1827