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