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