X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-grobs.scm;h=84c3f72f8fbb72c715ebab652bd81c2780b31998;hb=934e715b4024d2238c03d67548255876ad465cf1;hp=826fba0a9a2c9566c56ddab6b4f16e8b0d012028;hpb=c360891a6acdcf519baab2f375d23570dc400d51;p=lilypond.git diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 826fba0a9a..84c3f72f8f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -36,6 +36,7 @@ (Y-extent . ,ly:accidental-interface::height) (meta . ((class . Item) (interfaces . (accidental-interface + inline-accidental-interface font-interface)))))) (AccidentalCautionary @@ -48,6 +49,7 @@ (Y-extent . ,ly:accidental-interface::height) (meta . ((class . Item) (interfaces . (accidental-interface + inline-accidental-interface font-interface)))))) (AccidentalPlacement @@ -177,6 +179,8 @@ (BalloonTextItem . ( + (annotation-balloon . #t) + (annotation-line . #t) (stencil . ,ly:balloon-interface::print) (text . ,(grob::calc-property-by-copy 'text)) (X-offset . ,(grob::calc-property-by-copy 'X-offset)) @@ -190,7 +194,6 @@ . ( (allow-span-bar . #t) (bar-extent . ,ly:bar-line::calc-bar-extent) - (bar-size . ,ly:bar-line::calc-bar-size) (break-align-anchor . ,ly:bar-line::calc-anchor) (break-align-symbol . staff-bar) (break-visibility . ,bar-line::calc-break-visibility) @@ -325,7 +328,6 @@ . ( ;; todo: clean this up a bit: the list is getting ;; rather long. - (auto-knee-gap . 5.5) (beam-thickness . 0.48) ; in staff-space @@ -347,6 +349,13 @@ (beaming . ,ly:beam::calc-beaming) (clip-edges . #t) + (collision-interfaces . (beam-interface + clef-interface + inline-accidental-interface + key-signature-interface + note-head-interface + stem-interface + time-signature-interface)) (concaveness . ,ly:beam::calc-concaveness) (cross-staff . ,ly:beam::calc-cross-staff) (damping . 1) @@ -361,9 +370,12 @@ (hint-direction-penalty . 20) (musical-direction-factor . 400) (ideal-slope-factor . 10) + (collision-penalty . 500) + (collision-padding . 0.35) (round-to-zero-slope . 0.02))) (direction . ,ly:beam::calc-direction) + (normalized-endpoints . ,ly:spanner::calc-normalized-endpoints) ;; only for debugging. (font-family . roman) @@ -493,6 +505,7 @@ (font-family . sans) (font-size . 1.5) (stencil . ,ly:text-interface::print) + (extra-spacing-height . (0.2 . -0.2)) (word-space . 0.0) (meta . ((class . Item) (interfaces . (chord-name-interface @@ -517,7 +530,6 @@ (next-note . (extra-space . 0.5)) (right-edge . (extra-space . 0.5)))) (stencil . ,ly:clef::print) - (extra-spacing-height . (-0.5 . 0.5)) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (break-aligned-interface @@ -584,7 +596,6 @@ (next-note . (extra-space . 0.5)) (right-edge . (extra-space . 0.5)))) (stencil . ,ly:clef::print) - (extra-spacing-height . (-0.5 . 0.5)) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (break-aligned-interface @@ -612,7 +623,6 @@ (next-note . (extra-space . 0.5)) (right-edge . (extra-space . 0.5)))) (stencil . ,ly:clef::print) - (extra-spacing-height . (-0.5 . 0.5)) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (break-aligned-interface @@ -670,7 +680,6 @@ (slope . 1.0) (stencil . ,ly:percent-repeat-item-interface::double-percent) (thickness . 0.48) - (width . 2.0) (meta . ((class . Item) (interfaces . (break-aligned-interface font-interface @@ -702,6 +711,20 @@ side-position-interface text-interface)))))) + (DoubleRepeatSlash + . ( + (dot-negative-kern . 0.75) + (font-encoding . fetaMusic) + (slash-negative-kern . 1.6) + (slope . 1.0) + (stencil . ,ly:percent-repeat-item-interface::beat-slash) + (thickness . 0.48) + (meta . ((class . Item) + (interfaces . (font-interface + percent-repeat-interface + percent-repeat-item-interface + rhythmic-grob-interface)))))) + (DynamicLineSpanner . ( (axes . (,Y)) @@ -781,10 +804,12 @@ (left-bound-info . ,ly:line-spanner::calc-left-bound-info-and-text) + (minimum-length . 2.0) ;; make sure the spanner doesn't get too close to notes (minimum-Y-extent . (-1 . 1)) (right-bound-info . ,ly:line-spanner::calc-right-bound-info) + (springs-and-rods . ,ly:spanner::set-spacing-rods) (stencil . ,ly:line-spanner::print) (style . dashed-line) (meta . ((class . Spanner) @@ -851,11 +876,47 @@ text-interface text-script-interface)))))) + (FootnoteItem + . ( + (annotation-balloon . #f) + (annotation-line . #t) + (break-visibility . ,inherit-y-parent-visibility) + (footnote-text . ,(grob::calc-property-by-copy 'footnote-text)) + (stencil . ,ly:balloon-interface::print) + (text . ,(grob::calc-property-by-copy 'text)) + (Y-extent . #f) + (X-offset . ,(grob::calc-property-by-copy 'X-offset)) + (Y-offset . ,(grob::calc-property-by-copy 'Y-offset)) + (meta . ((class . Item) + (interfaces . (balloon-interface + footnote-interface + font-interface + text-interface)))))) + + (FootnoteSpanner + . ( + (annotation-balloon . #f) + (annotation-line . #t) + (footnote-text . ,(grob::calc-property-by-copy 'footnote-text)) + (spanner-placement . ,LEFT) + (stencil . ,ly:balloon-interface::print-spanner) + (text . ,(grob::calc-property-by-copy 'text)) + (Y-extent . #f) + (X-offset . ,(grob::calc-property-by-copy 'X-offset)) + (Y-offset . ,(grob::calc-property-by-copy 'Y-offset)) + (meta . ((class . Spanner) + (interfaces . (balloon-interface + footnote-interface + footnote-spanner-interface + font-interface + text-interface)))))) + (FretBoard . ( (after-line-breaking . ,ly:chord-name::after-line-breaking) (fret-diagram-details . ((finger-code . below-string))) (stencil . ,fret-board::calc-stencil) + (extra-spacing-height . (0.2 . -0.2)) (meta . ((class . Item) (interfaces . (chord-name-interface font-interface @@ -875,6 +936,7 @@ )) (gap . 0.5) (left-bound-info . ,ly:line-spanner::calc-left-bound-info) + (normalized-endpoints . ,ly:spanner::calc-normalized-endpoints) (right-bound-info . ,ly:line-spanner::calc-right-bound-info) (stencil . ,ly:line-spanner::print) (style . line) @@ -1008,6 +1070,7 @@ (right-edge . (extra-space . 0.5)) (first-note . (fixed-space . 2.5)))) (stencil . ,ly:key-signature-interface::print) + (extra-spacing-width . (0.0 . 0.5)) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (break-aligned-interface @@ -1031,7 +1094,7 @@ (right-edge . (extra-space . 0.5)) (first-note . (fixed-space . 2.5)))) (stencil . ,ly:key-signature-interface::print) - (extra-spacing-height . (-0.5 . 0.5)) + (extra-spacing-width . (0.0 . 0.5)) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (break-aligned-interface @@ -1080,6 +1143,7 @@ (break-align-symbol . left-edge) (break-visibility . ,center-invisible) (non-musical . #t) + (extra-spacing-height . (+inf.0 . -inf.0)) (space-alist . ( (ambitus . (extra-space . 2.0)) (breathing-sign . (minimum-space . 0.0)) @@ -1129,6 +1193,7 @@ (LyricHyphen . ( + (after-line-breaking . ,ly:spanner::kill-zero-spanned-time) (dash-period . 10.0) (height . 0.42) (length . 0.66) @@ -1159,6 +1224,9 @@ (LyricText . ( (extra-spacing-width . (0.0 . 0.0)) + ;; Recede in height for purposes of note spacing, + ;; so notes in melismata can be freely spaced above lyrics + (extra-spacing-height . (0.2 . -0.2)) (font-series . medium) (font-size . 1.0) (self-alignment-X . ,CENTER) @@ -1196,7 +1264,6 @@ (MensuralLigature . ( - (flexa-width . 2.0) (stencil . ,ly:mensural-ligature::print) (thickness . 1.4) (meta . ((class . Spanner) @@ -1305,8 +1372,11 @@ (before-line-breaking . ,ly:paper-column::before-line-breaking) (full-measure-extra-space . 1.0) (horizontal-skylines . ,ly:separation-item::calc-skylines) + ;; sufficient padding to prevent ledger lines from moving over/under + (skyline-vertical-padding . 0.6) ;; (stencil . ,ly:paper-column::print) + (keep-inside-line . #t) (line-break-permission . allow) (non-musical . #t) (page-break-permission . allow) @@ -1341,6 +1411,7 @@ . ( (axes . (,X ,Y)) (horizontal-skylines . ,ly:separation-item::calc-skylines) + (skyline-vertical-padding . 0.15) (X-extent . ,ly:axis-group-interface::width) (Y-extent . ,ly:axis-group-interface::height) (meta . ((class . Item) @@ -1352,9 +1423,11 @@ (NoteHead . ( + (flexa-width . 2.0) (duration-log . ,note-head::calc-duration-log) (extra-spacing-height . ,ly:note-head::include-ledger-line-height) (glyph-name . ,note-head::calc-glyph-name) + (ligature-flexa . #f) (stem-attachment . ,ly:note-head::calc-stem-attachment) (stencil . ,ly:note-head::print) (X-offset . ,ly:note-head::stem-x-shift) @@ -1441,6 +1514,7 @@ (axes . (,X)) (before-line-breaking . ,ly:paper-column::before-line-breaking) (horizontal-skylines . ,ly:separation-item::calc-skylines) + (keep-inside-line . #t) ;; (stencil . ,ly:paper-column::print) (X-extent . ,ly:axis-group-interface::width) @@ -1566,6 +1640,7 @@ (RepeatSlash . ( + (slash-negative-kern . 0.85) (slope . 1.7) (stencil . ,ly:percent-repeat-item-interface::beat-slash) (thickness . 0.48) @@ -1721,7 +1796,6 @@ . ( (allow-span-bar . #t) (bar-extent . ,ly:axis-group-interface::height) - (bar-size . ,ly:span-bar::calc-bar-size) (before-line-breaking . ,ly:span-bar::before-line-breaking) (break-align-symbol . staff-bar) (cross-staff . #t) @@ -1803,7 +1877,7 @@ . ( ;; 3.5 (or 3 measured from note head) is standard length ;; 32nd, 64th, 128th flagged stems should be longer - (lengths . (3.5 3.5 3.5 4.5 5.0 6.0)) + (lengths . (3.5 3.5 3.5 4.25 5.0 6.0)) ;; FIXME. 3.5 yields too long beams (according to Ross and ;; looking at Baerenreiter examples) for a number of common @@ -2181,6 +2255,7 @@ (meta . ((class . Item) (interfaces . (accidental-interface font-interface + inline-accidental-interface side-position-interface trill-pitch-accidental-interface)))))) @@ -2489,6 +2564,7 @@ ly:note-head::print ly:dots::print ly:clef::print + ly:key-signature-interface::print ly:percent-repeat-item-interface::beat-slash ly:text-interface::print ly:script-interface::print