X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-grobs.scm;h=64be8844ceba21b71830a38d4123e667a3b6adf3;hb=e404fc552f975ad85360b50186f9fb689bd120e9;hp=af5f4fe36b49147d29b590291009b82f10f8e0df;hpb=32b31ea446f6724b42e360f9b53a5641399b2ea6;p=lilypond.git diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index af5f4fe36b..64be8844ce 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -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) @@ -406,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)) @@ -583,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 `(,+ @@ -727,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) @@ -813,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) @@ -845,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 @@ -1413,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) @@ -1461,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) @@ -1566,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) @@ -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) @@ -1895,6 +1899,7 @@ (cross-staff . ,ly:script-interface::calc-cross-staff) (direction . ,ly:script-interface::calc-direction) (font-encoding . fetaMusic) + (horizon-padding . 0.1) ; to avoid interleaving with accidentals (positioning-done . ,ly:script-interface::calc-positioning-done) (side-axis . ,Y) @@ -2197,7 +2202,6 @@ (SustainPedal . ( - (direction . ,RIGHT) (extra-spacing-width . (+inf.0 . -inf.0)) (padding . 0.0) ;; padding relative to SustainPedalLineSpanner (self-alignment-X . ,CENTER) @@ -2350,7 +2354,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 ? @@ -2499,13 +2503,14 @@ (axes . (,X)) (direction . ,RIGHT) (font-size . -4) + ;; minimum shift to the right, in case the parent note has no stem + (minimum-space . 2.5) + (horizon-padding . 0.1) ; to avoid interleaving with augmentation dots (padding . 0.3) (side-axis . ,X) (stencil . ,parenthesize-elements) (stencils . ,parentheses-item::calc-parenthesis-stencils) - ;; 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))) + (X-offset . ,ly:side-position-interface::x-aligned-side) (Y-extent . ,grob::always-Y-extent-from-stencil) (meta . ((class . Item) (interfaces . (axis-group-interface @@ -2707,6 +2712,7 @@ (VoltaBracket . ( + (baseline-skip . 1.7) (direction . ,UP) (edge-height . (2.0 . 2.0)) ;; staff-space; (font-encoding . fetaText) @@ -2789,11 +2795,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