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