X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-grobs.scm;h=de27efca1e2ab013add0735a7dd2afb2b13b479f;hb=dfff5d3d1a1001f65d1f7183837f56ccd64fb15a;hp=ee71f903c71ff164acb85566e84b5512398c7bff;hpb=6e5a98015b9862efdebb57d691fef23a0fb8409d;p=lilypond.git diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index ee71f903c7..de27efca1e 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -25,7 +25,7 @@ ;; TODO: junk the meta field in favor of something more compact? -(define-public all-grob-descriptions +(define-session-public all-grob-descriptions `( (Accidental . ( @@ -141,7 +141,9 @@ (AmbitusLine . ( - (gap . 0.35) + (gap . ,ambitus-line::calc-gap) + (length-fraction . 0.7) + (maximum-gap . 0.45) (stencil . ,ambitus::print) (thickness . 2) (X-offset . ,ly:self-alignment-interface::centered-on-x-parent) @@ -166,6 +168,7 @@ (Arpeggio . ( + (cross-staff . ,ly:arpeggio::calc-cross-staff) (direction . ,LEFT) (padding . 0.5) (positions . ,ly:arpeggio::calc-positions) @@ -405,11 +408,9 @@ ;; only for debugging. (font-family . roman) - (beam-gap . ,ly:beam::calc-beam-gap) - (minimum-length . ,ly:beam::calc-minimum-length) + (gap . 0.8) (neutral-direction . ,DOWN) (positions . ,beam::place-broken-parts-individually) - (springs-and-rods . ,ly:beam::calc-springs-and-rods) (X-positions . ,ly:beam::calc-x-positions) (transparent . ,(grob::inherit-parent-property X 'transparent)) @@ -582,7 +583,7 @@ (color . ,(grob::inherit-parent-property X 'color)) (self-alignment-X . ,CENTER) - (staff-padding . 0.2) + (staff-padding . 0.7) (stencil . ,ly:text-interface::print) (X-offset . ,(ly:make-simple-closure `(,+ @@ -726,6 +727,7 @@ (DotColumn . ( (axes . (,X)) + (chord-dots-limit . 3) (direction . ,RIGHT) (positioning-done . ,ly:dot-column::calc-positioning-done) (X-extent . ,ly:axis-group-interface::width) @@ -812,7 +814,6 @@ (direction . ,DOWN) (minimum-space . 1.2) (outside-staff-priority . 250) - (outside-staff-padding . 0.6) (padding . 0.6) (side-axis . ,Y) (slur-padding . 0.3) @@ -844,12 +845,11 @@ (positioning-done . ,ly:script-interface::calc-positioning-done) (right-padding . 0.5) (self-alignment-X . ,CENTER) - (self-alignment-Y . ,CENTER) (stencil . ,ly:text-interface::print) (vertical-skylines . ,grob::always-vertical-skylines-from-stencil) (Y-extent . ,grob::always-Y-extent-from-stencil) (X-offset . ,ly:self-alignment-interface::x-aligned-on-self) - (Y-offset . ,self-alignment-interface::y-aligned-on-self) + (Y-offset . ,(scale-by-font-size -0.6)) ; center on an 'm' (meta . ((class . Item) (interfaces . (dynamic-interface dynamic-text-interface @@ -1412,7 +1412,6 @@ (font-encoding . fetaText) (font-size . -2) (outside-staff-horizontal-padding . 0.5) - (outside-staff-padding . 0.5) (outside-staff-priority . 750) (self-alignment-X . ,CENTER) (side-axis . ,Y) @@ -1460,6 +1459,7 @@ (break-visibility . ,end-of-line-invisible) (direction . ,UP) (extra-spacing-width . (+inf.0 . -inf.0)) + (flag-style . default) (outside-staff-horizontal-padding . 0.2) (outside-staff-priority . 1000) (padding . 0.8) @@ -1565,18 +1565,18 @@ (axes . (,X)) (before-line-breaking . ,ly:paper-column::before-line-breaking) (bound-alignment-interfaces . (break-alignment-interface)) + ;; used by Paper_column::print when debugging columns: + (font-size . -7.5) (full-measure-extra-space . 1.0) (horizontal-skylines . ,ly:separation-item::calc-skylines) ;; (stencil . ,ly:paper-column::print) (keep-inside-line . #t) + ;; used by Paper_column::print when debugging columns: + (layer . 1000) (line-break-permission . allow) (non-musical . #t) (page-break-permission . allow) - - ;; debugging stuff: print column number. - ;; (font-size . -6) (font-name . "sans") (Y-extent . #f) - (X-extent . ,ly:axis-group-interface::width) (meta . ((class . Paper_column) (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common) @@ -1604,7 +1604,6 @@ . ( (axes . (,X ,Y)) (bound-alignment-interfaces . (rhythmic-head-interface stem-interface)) - (cross-staff . ,ly:axis-group-interface::cross-staff) (horizontal-skylines . ,ly:separation-item::calc-skylines) (skyline-vertical-padding . 0.15) (X-extent . ,ly:axis-group-interface::width) @@ -1671,7 +1670,7 @@ (outside-staff-priority . 400) (padding . 0.5) (shorten-pair . (0.0 . -0.6)) - (staff-padding . 1.0) + (staff-padding . 2.0) (stencil . ,ly:ottava-bracket::print) (style . dashed-line) (vertical-skylines . ,grob::unpure-vertical-skylines-from-stencil) @@ -1691,16 +1690,17 @@ (axes . (,X)) (before-line-breaking . ,ly:paper-column::before-line-breaking) (bound-alignment-interfaces . (note-column-interface)) + ;; used by Paper_column::print when debugging columns: + (font-size . -7.5) (horizontal-skylines . ,ly:separation-item::calc-skylines) (keep-inside-line . #t) + ;; used by Paper_column::print when debugging columns: + (layer . 1000) ;; 0.08 comes from spacing-horizontal-skyline.ly ;; allows double flat of F to be nestled over dots of C (skyline-vertical-padding . 0.08) ;; (stencil . ,ly:paper-column::print) (X-extent . ,ly:axis-group-interface::width) - - ;; debugging - ;; (font-size . -6) (font-name . "sans") (Y-extent . #f) (meta . ((class . Paper_column) (object-callbacks . ((pure-Y-common . ,ly:axis-group-interface::calc-pure-y-common) (pure-relevant-grobs . ,ly:axis-group-interface::calc-pure-relevant-grobs))) @@ -1716,6 +1716,10 @@ (padding . 0.2) (stencil . ,parentheses-item::print) (stencils . ,parentheses-item::calc-parenthesis-stencils) + ;; X-extent needs to be non-empty in order to allow proper + ;; horizontal attachment. ParenthesesItem does not reserve + ;; space of its own, however. + (X-extent . (0 . 0)) (meta . ((class . Item) (interfaces . (font-interface parentheses-interface)))))) @@ -1804,7 +1808,7 @@ (extra-spacing-width . (+inf.0 . -inf.0)) (font-size . 2) (non-musical . #t) - (outside-staff-horizontal-padding . 0.12) + (outside-staff-horizontal-padding . 0.2) (outside-staff-priority . 1500) (padding . 0.8) (self-alignment-X . ,CENTER) @@ -1964,7 +1968,6 @@ (SostenutoPedalLineSpanner . ( (axes . (,Y)) - (cross-staff . ,ly:side-position-interface::calc-cross-staff) (direction . ,DOWN) (minimum-space . 1.0) (outside-staff-priority . 1000) @@ -2198,7 +2201,6 @@ (SustainPedal . ( - (direction . ,RIGHT) (extra-spacing-width . (+inf.0 . -inf.0)) (padding . 0.0) ;; padding relative to SustainPedalLineSpanner (self-alignment-X . ,CENTER) @@ -2216,7 +2218,6 @@ (SustainPedalLineSpanner . ( (axes . (,Y)) - (cross-staff . ,ly:side-position-interface::calc-cross-staff) (direction . ,DOWN) (minimum-space . 1.0) (outside-staff-priority . 1000) @@ -2352,7 +2353,7 @@ (cross-staff . ,script-or-side-position-cross-staff) (direction . ,DOWN) (extra-spacing-width . (+inf.0 . -inf.0)) - (outside-staff-horizontal-padding . 0.12) + (outside-staff-horizontal-padding . 0.2) (outside-staff-priority . 450) ;; sync with Fingering ? @@ -2505,7 +2506,9 @@ (side-axis . ,X) (stencil . ,parenthesize-elements) (stencils . ,parentheses-item::calc-parenthesis-stencils) - (X-offset . ,ly:side-position-interface::x-aligned-side) + ;; offset a bit to the right, further if needed to clear the main note + (X-offset . ,(lambda (grob) + (ly:side-position-interface::x-aligned-side grob 2.5))) (Y-extent . ,grob::always-Y-extent-from-stencil) (meta . ((class . Item) (interfaces . (axis-group-interface @@ -2615,7 +2618,6 @@ (UnaCordaPedalLineSpanner . ( (axes . (,Y)) - (cross-staff . ,ly:side-position-interface::calc-cross-staff) (direction . ,DOWN) (minimum-space . 1.0) (outside-staff-priority . 1000) @@ -2790,11 +2792,11 @@ ;; make sure that \property Foo.Bar =\turnOff doesn't complain -(map (lambda (x) - ;; (display (car x)) (newline) +(for-each (lambda (x) + ;; (display (car x)) (newline) - (set-object-property! (car x) 'translation-type? list?) - (set-object-property! (car x) 'is-grob? #t)) - all-grob-descriptions) + (set-object-property! (car x) 'translation-type? list?) + (set-object-property! (car x) 'is-grob? #t)) + all-grob-descriptions) (set! all-grob-descriptions (sort all-grob-descriptions alist