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