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