]> git.donarmstrong.com Git - lilypond.git/blob - scm/define-grobs.scm
f0471cdd856c0bab33f90b5514d799ab8ad69a2a
[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 `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
37                                                   ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
38         (self-alignment-X . ,CENTER)
39         (cautionary . #t)
40         (cautionary-style . smaller)
41         (Y-offset . ,Side_position_interface::y_aligned_side)
42         (cautionary-style . parentheses)
43         (direction . ,UP)
44         (staff-padding . 0.25)
45         (script-priority . 0)
46         (side-axis . ,X)
47         (meta . ((class . Item)
48                  (interfaces . (side-position-interface
49                                 script-interface
50                                 accidental-interface
51                                 accidental-suggestion-interface
52                                 self-alignment-interface
53                                 font-interface))))))
54     (AccidentalPlacement
55      . (
56         (left-padding . 0.2)
57
58         (positioning-done . ,Accidental_placement::calc_positioning_done)
59         (X-extent . ,Axis_group_interface::width)                     
60         
61         ;; this is quite small, but it is very ugly to have
62         ;; accs closer to the previous note than to the next one.
63         (right-padding . 0.15)
64         (meta . ((class . Item)
65                  (interfaces . (accidental-placement-interface))))))
66     (Ambitus
67      . (
68         (axes . (0 1))
69         (X-extent . ,Axis_group_interface::width)
70         (X-extent . ,Axis_group_interface::height)
71
72         (space-alist . (
73                         (clef . (extra-space . 0.5))
74                         (key-signature . (extra-space . 0.0))
75                         (staff-bar . (extra-space . 0.0))
76                         (time-signature . (extra-space . 0.0))
77                         (first-note . (fixed-space . 0.0))))
78         (breakable . #t)
79         (break-align-symbol . ambitus)
80         (break-visibility . ,begin-of-line-visible)
81         (meta . ((class . Item)
82                  (interfaces . (axis-group-interface
83                                 break-aligned-interface
84                                 ambitus-interface))))))
85
86     (AmbitusLine
87      . (
88
89         (stencil . ,Ambitus::print)
90
91         (join-heads . #t)
92         (thickness . 2)
93         (X-offset . ,Self_alignment_interface::centered_on_x_parent)
94
95         (meta . ((class . Item)
96                  (interfaces . (ambitus-interface
97                                 staff-symbol-referencer-interface
98                                 font-interface))))))
99     (AmbitusAccidental
100      . (
101         (font-family . music)
102         (padding . 0.5)
103         (X-offset . ,Side_position_interface::x_aligned_side)
104         (direction . -1)
105         (cautionary-style . parentheses)
106
107         (stencil . ,Accidental_interface::print)
108         (after-line-breaking . ,Accidental_interface::after_line_breaking)
109         (side-axis . ,X)
110         
111         (meta . ((class . Item)
112                  (interfaces . (item-interface
113                                 accidental-interface
114                                 break-aligned-interface
115                                 side-position-interface
116                                 font-interface))))))
117
118     (AmbitusNoteHead
119      . (
120         (duration-log . 2)
121
122         (stencil . ,Note_head::print)
123         (glyph-name . ,note-head::calc-glyph-name)
124         
125         (Y-offset . ,Staff_symbol_referencer::callback)
126         (meta . ((class . Item)
127                  (interfaces . (font-interface
128                                 note-head-interface
129                                 ambitus-interface
130                                 staff-symbol-referencer-interface
131                                 rhythmic-head-interface
132                                 ledgered-interface))))))
133
134     (Arpeggio
135      . (
136
137         (X-extent . ,Arpeggio::width)
138         (stencil . ,Arpeggio::print)
139
140         (Y-offset . ,Staff_symbol_referencer::callback)
141         (X-offset . ,Side_position_interface::x_aligned_side)
142         (direction . -1)
143         (padding . 0.5)
144         (side-axis . ,X)
145         (staff-position . 0.0)
146         (meta . ((class . Item)
147                  (interfaces . (arpeggio-interface
148                                 staff-symbol-referencer-interface
149                                 side-position-interface
150                                 font-interface))))))
151
152     (BarLine
153      . (
154         (break-align-symbol . staff-bar)
155         (glyph . "|")
156         (layer . 0)
157         (break-visibility . ,all-visible)
158         (breakable . #t)
159
160         (stencil . ,Bar_line::print)
161         (glyph-name . ,bar-line::calc-glyph-name)
162         (bar-size .  ,Bar_line::calc_bar_size)
163         
164         (space-alist . (
165                         (time-signature . (extra-space . 0.75))
166                         (custos . (minimum-space . 2.0))
167                         (clef . (minimum-space . 1.0))
168                         (key-signature . (extra-space . 1.0))
169                         (key-cancellation . (extra-space . 1.0))
170                         (first-note . (fixed-space . 1.3))
171                         (next-note . (semi-fixed-space . 1.3))
172                         (right-edge . (extra-space . 0.0))))
173
174         ;;
175         ;; Ross. page 151 lists other values, we opt for a leaner look
176         ;;
177         ;; TODO:
178         ;; kern should scale with linethickness too.
179         (kern . 3.0)
180         (thin-kern . 3.0)
181         (hair-thickness . 1.9)
182         (thick-thickness . 6.0)
183         (meta . ((class . Item)
184                  (interfaces . (bar-line-interface
185                                 break-aligned-interface
186                                 font-interface))))))
187
188     (BarNumber
189      . (
190         (stencil . ,Text_interface::print)
191         (breakable . #t)
192         (break-visibility . ,begin-of-line-visible)
193         (padding . 1.0)
194         (direction . 1)
195         (font-family . roman)
196         (font-size . -2)
197         (Y-offset . ,Side_position_interface::y_aligned_side)
198         (side-axis . ,Y)
199         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
200         (self-alignment-X . 1)
201
202         (meta .
203               ((class . Item)
204                (interfaces . (side-position-interface
205                               text-interface
206                               self-alignment-interface
207                               font-interface
208                               break-aligned-interface))))
209         ))
210
211     (BassFigure
212      . (
213
214         (stencil . ,Text_interface::print)
215
216         (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
217         (direction . 1)
218         (font-family . number)
219
220         ;; We must do this, other BFs in
221         ;; layout16 become too small.
222         (font-size . -4)
223         (kern . 0.2)
224         (meta . ((class . Item)
225                  (interfaces . (text-interface
226                                 rhythmic-grob-interface
227                                 bass-figure-interface
228                                 self-alignment-interface
229                                 font-interface))))))
230
231     (NewBassFigure
232      . (
233         ;
234         (stencil . ,Text_interface::print)
235
236         (meta . ((class . Item)
237                  (interfaces . (text-interface
238                                 rhythmic-grob-interface
239                                 bass-figure-interface
240                                 font-interface))))))
241     (BassFigureBracket
242      . (
243         ;
244         (stencil . ,Enclosing_bracket::print)
245
246         (edge-height . (0.2 . 0.2))
247         (meta . ((class . Item)
248                  (interfaces . (enclosing-bracket-interface)) ))
249         ))
250     (BassFigureContinuation
251      . (
252
253         (stencil . ,Figured_bass_continuation::print)
254
255         (Y-offset . ,Figured_bass_continuation::center_on_figures)
256         (meta . ((class . Spanner)
257                  (interfaces . (figured-bass-continuation-interface))
258                  ))))
259     (BassFigureLine
260      . (
261         (axes . (,Y))
262
263         (Y-extent . ,Axis_group_interface::height)
264
265         (meta . ((class . Spanner)
266                  (interfaces . (axis-group-interface
267                                 ))))))
268
269     (BassFigureAlignment
270      . (
271         (axes . (,Y))
272         (threshold . (2 . 1000))
273
274         (positioning-done . ,Align_interface::calc_positioning_done)
275         (Y-extent . ,Axis_group_interface::height)
276                                         
277         (stacking-dir . -1)
278         (meta . ((class . Spanner)
279                  (interfaces . (align-interface
280                                 axis-group-interface))))))
281
282     (Beam
283      . (
284         ;; todo: clean this up a bit: the list is getting
285         ;; rather long.
286         (gap . 0.8)
287         (positions .  ,(ly:make-simple-closure
288                         (ly:make-simple-closure
289                          (list chain-grob-member-functions
290                            `(,cons 0 0)
291                            Beam::calc_least_squares_positions
292                            Beam::slope_damping
293                            Beam::shift_region_to_valid
294                            Beam::quanting
295                            ))))
296
297         ;; this is a hack to set stem lengths, if positions is set.
298         (quantized-positions . ,Beam::set_stem_lengths)
299         (concaveness . ,Beam::calc_concaveness)
300         (direction . ,Beam::calc_direction)
301         (stencil . ,Beam::print)
302
303         ;; TODO: should be in SLT.
304         (thickness . 0.48) ; in staff-space
305         (neutral-direction . -1)
306
307         ;; Whe have some unreferenced problems here.
308         ;;
309         ;; If we shorten beamed stems less than normal stems (1 staffspace),
310         ;; or high order less than 8th beams, patterns like
311         ;;     c''4 [c''8 c''] c''4 [c''16 c]
312         ;; are ugly (different stem lengths).
313         ;;
314         ;; But if we shorten 16th beams as much as 8th beams, a single
315         ;; forced 16th beam looks *very* short.
316
317         ;; We choose to shorten 8th beams the same as single stems,
318         ;; and high order beams less than 8th beams, so that all
319         ;; isolated shortened beams look nice and a bit shortened,
320         ;; sadly possibly breaking patterns with high order beams.
321         (beamed-stem-shorten . (1.0 0.5 0.25))
322         (damping . 1)
323         (auto-knee-gap . 5.5)
324
325         ;; only for debugging.
326         (font-family . roman)
327         (meta . ((class . Spanner)
328                  (interfaces . (staff-symbol-referencer-interface
329                                 beam-interface))))))
330
331     (BreakAlignment
332      . (
333         (breakable . #t)
334         (stacking-dir . 1)
335
336         (positioning-done . ,Break_align_interface::calc_positioning_done)
337         (X-extent . ,Axis_group_interface::width)
338                                         
339         (break-align-orders . ;; end of line
340                             #((instrument-name
341                                left-edge
342                                ambitus
343                                breathing-sign
344                                clef
345                                staff-bar
346                                key-cancellation
347                                key-signature
348                                time-signature
349                                custos)
350
351                               ;; unbroken
352                               (instrument-name
353                                left-edge
354                                ambitus
355                                breathing-sign
356                                clef
357                                staff-bar
358                                key-cancellation
359                                key-signature
360                                staff
361                                time-signature custos)
362
363                               ;; begin of line
364                               (instrument-name
365                                left-edge
366                                ambitus
367                                breathing-sign
368                                clef
369                                key-cancellation
370                                key-signature
371                                staff-bar
372                                time-signature
373                                custos)))
374         (axes . (0))
375         (meta . ((class . Item)
376                  (interfaces . (break-alignment-interface
377                                 axis-group-interface))))))
378
379     (BreakAlignGroup
380      . (
381         (axes . (0))
382
383         (X-extent . ,Axis_group_interface::width)
384
385         (meta . ((class . Item)
386                  (interfaces . (break-aligned-interface
387                                 axis-group-interface))))))
388
389     (BreathingSign
390      . (
391         (break-align-symbol . breathing-sign)
392         (breakable . #t)
393         (space-alist . (
394                         (ambitus . (extra-space . 2.0))
395                         (custos . (minimum-space . 1.0))
396                         (key-signature . (minimum-space . 1.5))
397                         (time-signature . (minimum-space . 1.5))
398                         (staff-bar . (minimum-space . 1.5))
399                         (clef . (minimum-space . 2.0))
400                         (first-note . (fixed-space . 1.0)) ;huh?
401                         (right-edge . (extra-space . 0.1))))
402
403         (stencil . ,Text_interface::print)
404
405         (text . ,(make-musicglyph-markup "scripts.rcomma"))
406         (Y-offset . ,Breathing_sign::offset_callback)
407         (break-visibility . ,begin-of-line-invisible)
408         (meta . ((class . Item)
409                  (interfaces . (break-aligned-interface
410                                 breathing-sign-interface
411                                 text-interface
412                                 font-interface))))))
413
414     (Clef
415      . (
416
417         (stencil . ,Clef::print)
418         (glyph-name . ,Clef::calc_glyph_name)
419                                         
420         (breakable . #t)
421         (font-family . music)
422         (break-align-symbol . clef)
423         (break-visibility . ,begin-of-line-visible)
424         (space-alist . ((ambitus . (extra-space . 2.0))
425                         (staff-bar . (extra-space . 0.7))
426                         (key-cancellation . (minimum-space . 3.5))
427                         (key-signature . (minimum-space . 3.5))
428                         (time-signature . (minimum-space . 4.2))
429                         (first-note . (minimum-fixed-space . 5.0))
430                         (next-note . (extra-space . 0.5))
431                         (right-edge . (extra-space . 0.5))))
432         (Y-offset . ,Staff_symbol_referencer::callback)
433         (meta . ((class . Item)
434                  (interfaces . (clef-interface
435                                 staff-symbol-referencer-interface
436                                 font-interface
437                                 break-aligned-interface))))))
438
439     (ClusterSpannerBeacon
440      . (
441
442         (Y-extent . ,Cluster_beacon::height)
443
444         (meta . ((class . Item)
445                  (interfaces . (cluster-beacon-interface))))))
446
447     (ClusterSpanner
448      . (
449
450         (springs-and-rods . ,Spanner::set_spacing_rods)
451         (stencil . ,Cluster::print)
452
453
454         (minimum-length . 0.0)
455         (padding . 0.25)
456         (style . ramp)
457         (meta . ((class . Spanner)
458                  (interfaces . (cluster-interface))))))
459
460     (ChordName
461      . (
462
463         (stencil . ,Text_interface::print)
464         (after-line-breaking . ,Chord_name::after_line_breaking)
465         
466         (word-space . 0.0)
467         (font-family . sans)
468         (font-size . 1.5)
469         (meta . ((class . Item)
470                  (interfaces . (font-interface
471                                 rhythmic-grob-interface
472                                 text-interface
473                                 chord-name-interface
474                                 item-interface))))))
475
476     (CombineTextScript
477      . (
478
479         (stencil . ,Text_interface::print)
480
481         (no-spacing-rods . #t)
482         (Y-offset . ,Side_position_interface::y_aligned_side)
483         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
484         (direction . 1)
485         (padding . 0.5)
486         (staff-padding . 0.5)
487         (script-priority . 200)
488         ;; todo: add X self alignment?
489         (baseline-skip . 2)
490         (side-axis . ,Y)
491         (font-series . bold)
492         (meta . ((class . Item)
493                  (interfaces . (text-script-interface
494                                 text-interface
495                                 side-position-interface
496                                 font-interface))))))
497
498     (Custos
499      . (
500         (break-align-symbol . custos)
501         (breakable . #t)
502
503         (stencil . ,Custos::print)
504
505         (break-visibility . ,end-of-line-visible)
506         (style . vaticana)
507         (neutral-direction . -1)
508         (Y-offset . ,Staff_symbol_referencer::callback)
509         (space-alist . (
510                         (first-note . (minimum-fixed-space . 0.0))
511                         (right-edge . (extra-space . 0.1))))
512         (meta . ((class . Item)
513                  (interfaces
514                   . (custos-interface
515                      staff-symbol-referencer-interface
516                      font-interface
517                      break-aligned-interface))))))
518
519     (DotColumn
520      . (
521         (axes . (0))
522         (direction . ,RIGHT)
523
524         (positioning-done . ,Dot_column::calc_positioning_done) 
525         (X-extent . ,Axis_group_interface::width)
526         
527         (X-offset . ,Dot_column::side_position)
528         (meta . ((class . Item)
529                  (interfaces . (dot-column-interface
530                                 axis-group-interface))))))
531
532     (Dots
533      . (
534
535         (stencil . ,Dots::print)
536
537         (dot-count . 1)
538         (meta . ((class . Item)
539                  (interfaces . (font-interface
540                                 staff-symbol-referencer-interface
541                                 dots-interface))))))
542
543     (DoublePercentRepeat
544      . (
545         (stencil . ,Percent_repeat_item_interface::double_percent)
546         (breakable . #t)
547         (slope . 1.0)
548         (font-encoding . fetaMusic)
549         (width . 2.0)
550         (thickness . 0.48)
551         (break-align-symbol . staff-bar)
552         (break-visibility . ,begin-of-line-invisible)
553         (meta . ((class . Item)
554                  (interfaces . (font-interface
555                                 break-aligned-interface
556                                 percent-repeat-interface))))))
557
558     (DoublePercentRepeatCounter
559      . (
560
561         (stencil . ,Text_interface::print)
562         (X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_y_parent))
563                                                   ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
564         (Y-offset . ,Side_position_interface::y_aligned_side)
565         (font-encoding . fetaNumber)
566         (self-alignment-X . 0)
567         (font-size . -2) 
568         (direction . 1)
569         (padding . 0.2)
570         (staff-padding . 0.25)
571         (side-axis . ,Y)
572         (meta . ((class . Item)
573                  (interfaces . (side-position-interface
574                                 self-alignment-interface
575                                 percent-repeat-interface
576                                 font-interface
577                                 text-interface))))))
578     (DynamicLineSpanner
579      . (
580         (axes . (1))
581         (Y-offset . ,Side_position_interface::y_aligned_side)
582         (staff-padding . 0.1)
583         (padding . 0.6)
584         (avoid-slur . outside)
585         (slur-padding . 0.3)
586         (minimum-space . 1.2)
587         (direction . -1)
588         (side-axis . ,Y)
589
590         (Y-extent . ,Axis_group_interface::height)
591         (X-extent . ,Axis_group_interface::width)
592
593
594         (meta . ((class . Spanner)
595                  (interfaces . (axis-group-interface
596                                 dynamic-interface
597                                 dynamic-line-spanner-interface
598                                 side-position-interface))))))
599
600     (DynamicText
601      . (
602
603         ;; todo.
604
605         (stencil . ,Text_interface::print)
606         (direction . ,Script_interface::calc_direction)
607
608         (X-offset . ,Self_alignment_interface::x_aligned_on_self)
609         (self-alignment-X . 0)
610         (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
611         (self-alignment-Y . 0)
612         (font-series . bold)
613         (font-encoding . fetaDynamic)
614         (font-shape . italic)
615         (no-spacing-rods . #t)
616         (script-priority . 100)
617         (meta . ((class . Item)
618                  (interfaces . (font-interface
619                                 text-interface
620                                 self-alignment-interface
621                                 dynamic-interface
622                                 script-interface))))))
623
624     (DynamicTextSpanner
625      . (
626
627         (stencil . ,Dynamic_text_spanner::print)
628
629         ;; rather ugh with NCSB
630         ;; (font-series . bold)
631         (font-shape . italic)
632         (style . dashed-line)
633
634         ;; need to blend with dynamic texts.
635         (font-size . 1)
636         (bound-padding . 0.75)
637         (dash-fraction . 0.2)
638         (dash-period . 3.0)
639         (meta . ((class . Spanner)
640                  (interfaces . (font-interface
641                                 text-interface
642                                 dynamic-interface
643                                 dynamic-text-spanner-interface
644                                 spanner-interface))))))
645
646     (Fingering
647      . (
648
649         ;; sync with TextScript (?)
650
651         (padding . 0.5)
652         (avoid-slur . around)
653         (slur-padding . 0.2)
654         (staff-padding . 0.5)
655         (self-alignment-X . 0)
656         (self-alignment-Y . 0)
657         (script-priority . 100)
658
659         (stencil . ,Text_interface::print)
660         (direction . ,Script_interface::calc_direction)
661
662         (font-encoding . fetaNumber)
663         (font-size . -5)                ; don't overlap when next to heads.
664         (meta . ((class . Item)
665                  (interfaces . (finger-interface
666                                 font-interface
667                                 text-script-interface
668                                 text-interface
669                                 side-position-interface
670                                 self-alignment-interface
671                                 item-interface))))))
672     (Glissando
673      . (
674         (style . line)
675         (gap . 0.5)
676         (zigzag-width . 0.75)
677         (breakable . #t)
678         (X-extent . #f)
679         (Y-extent . #f)
680
681         (stencil . ,Line_spanner::print)
682         (after-line-breaking . ,Line_spanner::after_line_breaking)
683         
684
685         (meta . ((class . Spanner)
686                  (interfaces . (line-interface
687                                 line-spanner-interface))))))
688
689     (GridPoint
690      . (
691         (X-extent . (0 . 0))
692         (Y-extent . (0 . 0))
693         (meta . ((class . Item)
694                  (interfaces . (grid-point-interface))))))
695
696     (GridLine
697      . (
698
699         (X-extent  . ,Grid_line_interface::width)
700         (stencil . ,Grid_line_interface::print)
701
702         (self-alignment-X . ,CENTER)
703         (X-offset . ,(ly:make-simple-closure
704                       `(,+  ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
705                             ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
706         (layer . 0)
707         (meta . ((class . Item)
708                  (interfaces . (self-alignment-interface
709                                 grid-line-interface))))))
710
711     (Hairpin
712      . (
713
714
715         (stencil . ,Hairpin::print)
716         (springs-and-rods . ,Spanner::set_spacing_rods)
717         (after-line-breaking . ,Hairpin::after_line_breaking)
718
719         (thickness . 1.0)
720         (height . 0.6666)
721         (minimum-length . 2.0)
722         (bound-padding . 1.0)
723         (self-alignment-Y . 0)
724         (Y-offset . ,Self_alignment_interface::y_aligned_on_self)
725         (meta . ((class . Spanner)
726                  (interfaces . (hairpin-interface
727                                 line-interface
728                                 self-alignment-interface
729                                 dynamic-interface
730                                 spanner-interface))))))
731
732     (HorizontalBracket
733      . (
734         (thickness . 1.0)
735         (stencil . ,Horizontal_bracket::print)
736         (Y-offset . ,Side_position_interface::y_aligned_side)
737         (padding . 0.2)
738         (staff-padding . 0.2)
739         (direction . -1)
740         (side-axis . ,Y)
741         (bracket-flare . (0.5 . 0.5))
742         (meta . ((class . Spanner)
743                  (interfaces . (horizontal-bracket-interface
744                                 side-position-interface
745                                 line-interface
746                                 spanner-interface))))))
747     (InstrumentName
748      . (
749         (breakable . #t)
750         (Y-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
751                                                   ,(ly:make-simple-closure (list Side_position_interface::y_aligned_on_support_refpoints)))))
752         
753         ;; This direction is for aligned_on_support_refpoints
754         ;; (?) --hwn
755         (direction . 0)
756         (space-alist . (
757                         (left-edge . (extra-space . 1.0))))
758
759         (self-alignment-Y . 0)
760         (stencil . ,Text_interface::print)
761         (break-align-symbol . instrument-name)
762         (break-visibility . ,begin-of-line-visible)
763         (baseline-skip . 2)
764         (side-axis . ,X)
765         (meta . ((class . Item)
766                  (interfaces . (font-interface
767                                 self-alignment-interface
768                                 side-position-interface
769                                 text-interface
770                                 break-aligned-interface))))))
771
772     (KeyCancellation
773      . (
774
775         (stencil . ,Key_signature_interface::print)
776
777         (space-alist . (
778                         (time-signature . (extra-space . 1.25))
779                         (staff-bar . (extra-space . 0.6))
780                         (key-signature . (extra-space . 0.5))
781                         (right-edge . (extra-space . 0.5))
782                         (first-note . (fixed-space . 2.5))))
783         (Y-offset . ,Staff_symbol_referencer::callback)
784         (break-align-symbol . key-cancellation)
785         (break-visibility . ,begin-of-line-invisible)
786         (breakable . #t)
787
788         (meta . ((class . Item)
789                  (interfaces . (key-signature-interface
790                                 font-interface
791                                 break-aligned-interface))))))
792     (KeySignature
793      . (
794
795         (stencil . ,Key_signature_interface::print)
796
797         (space-alist . (
798                         (time-signature . (extra-space . 1.15))
799                         (staff-bar . (extra-space . 1.1))
800                         (right-edge . (extra-space . 0.5))
801                         (first-note . (fixed-space . 2.5))))
802         (Y-offset . ,Staff_symbol_referencer::callback)
803         (break-align-symbol . key-signature)
804         (break-visibility . ,begin-of-line-visible)
805         (breakable . #t)
806
807         (meta . ((class . Item)
808                  (interfaces . (key-signature-interface
809                                 font-interface
810                                 break-aligned-interface))))))
811     (LaissezVibrerTie
812      . (
813
814         (stencil  . ,Tie::print)
815         (control-points . ,Laissez_vibrer_tie::calc_control_points)
816         (direction . ,Laissez_vibrer_tie::calc_direction)
817         
818         (details . ((ratio . 0.333)
819                     (height-limit . 1.0)))
820         (thickness . 1.0)
821         (meta . ((class . Item)
822                  (interfaces . (laissez-vibrer-tie-interface))
823                  ))
824         ))
825
826     (LaissezVibrerTieColumn
827      . (
828         (X-extent . #f)
829         (Y-extent . #f)
830
831         (positioning-done . ,Laissez_vibrer_tie_column::calc_positioning_done)
832         
833         (meta . ((class . Item)
834                  (interfaces . (laissez-vibrer-tie-column-interface))
835                  ))
836         ))
837
838     (LedgerLineSpanner
839      . (
840
841         (springs-and-rods . ,Ledger_line_spanner::set_spacing_rods)
842
843         (stencil . ,Ledger_line_spanner::print)
844
845         (X-extent . #f)
846         (Y-extent . #f)
847         (minimum-length-fraction . 0.25)
848         (length-fraction . 0.25)
849         (layer . 0)
850         (meta . ((class . Spanner)
851                  (interfaces . (ledger-line-interface))))))
852
853     (LeftEdge
854      . (
855         (break-align-symbol . left-edge)
856         (X-extent . (0 . 0))
857         (breakable . #t)
858         (break-visibility . ,center-invisible)
859         (space-alist . (
860                         (custos . (extra-space . 0.0))
861                         (ambitus . (extra-space . 2.0))
862                         (time-signature . (extra-space . 1.0))
863                         (staff-bar . (extra-space . 0.0))
864                         (breathing-sign . (minimum-space . 0.0))
865                         (clef . (extra-space . 0.8))
866                         (first-note . (fixed-space . 2.0))
867                         (right-edge . (extra-space . 0.0))
868                         (key-signature . (extra-space . 0.0))
869                         (key-cancellation . (extra-space . 0.0))
870                         ))
871         (meta . ((class . Item)
872                  (interfaces . (break-aligned-interface))))))
873
874     (LigatureBracket
875      . (
876         ;; ugh.  A ligature bracket is totally different from
877         ;; a tuplet bracket.
878
879         (direction  . ,Tuplet_bracket::calc_direction)
880         (positions . ,Tuplet_bracket::calc_positions)
881         (stencil . ,Tuplet_bracket::print)
882         
883         (direction . 1)
884         (gap . 0.0)
885         (padding . 2.0)
886         (thickness . 1.6)
887         (edge-height . (0.7 . 0.7))
888         (shorten-pair . (-0.2 . -0.2))
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