X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fgrob-description.scm;h=6f72730b9b857264aa0ccb251e9eb28ba87156ec;hb=21366dd8ddec170ae4af0d18f061be0f2eceb240;hp=c32aeb71dc7937db2de0e1d389352e74ea79ffac;hpb=86ae245eef3d991483f27f135ded2c9bc29043f3;p=lilypond.git diff --git a/scm/grob-description.scm b/scm/grob-description.scm index c32aeb71dc..6f72730b9b 100644 --- a/scm/grob-description.scm +++ b/scm/grob-description.scm @@ -22,9 +22,12 @@ )) (AccidentalPlacement . ( - (X-extent-callback . ,Accidental_placement::extent_callback) + (X-extent-callback . ,Axis_group_interface::group_extent_callback) (left-padding . 0.3) - (right-padding . 0.3) + + ;; this is quite small, but it is very ugly to have + ;; accs closer to the previous note than to the next one. + (right-padding . 0.15) (meta . ((interfaces . (item-interface accidental-placement-interface)))) )) @@ -141,13 +144,28 @@ (after-line-breaking-callback . ,Beam::after_line_breaking) (neutral-direction . -1) (dir-function . ,beam-dir-majority-median) - (beamed-stem-shorten . (1.0 0.5)) + + ;; Whe have some unreferenced problems here. + ;; + ;; If we shorten beamed stems less than normal stems (1 staffspace), + ;; or high order less than 8th beams, patterns like + ;; c''4 [c''8 c''] c''4 [c''16 c] + ;; are ugly (different stem lengths). + ;; + ;; But if we shorten 16th beams as much as 8th beams, a single + ;; forced 16th beam looks *very* short. + + ;; We choose to shorten 8th beams the same as single stems, + ;; and high order beams less than 8th beams, so that all + ;; isolated shortened beams look nice and a bit shortened, + ;; sadly possibly breaking patterns with high order beams. + (beamed-stem-shorten . (1.0 0.5 0.25)) + (outer-stem-length-limit . 0.2) (slope-limit . 0.2) (flag-width-function . ,default-beam-flag-width-function) (damping . 1) -;; (auto-knee-gap . 7) - + (auto-knee-gap . 5.5) (font-name . "cmr10") (space-function . ,Beam::space_function) (meta . ((interfaces . (staff-symbol-referencer-interface beam-interface spanner-interface)))) @@ -234,7 +252,10 @@ (space-alist . ( (first-note . (minimum-space . 0.0)) )) - (meta . ((interfaces . (custos-interface staff-symbol-referencer-interface break-aligned-interface item-interface )))) + (meta . ((interfaces + . (custos-interface staff-symbol-referencer-interface + font-interface + break-aligned-interface item-interface )))) )) @@ -283,7 +304,7 @@ (font-family . dynamic) (font-shape . italic) (self-alignment-Y . 0) - (meta . ((interfaces . (font-interface text-interface self-alignment-interface dynamic-interface item-interface )))) + (meta . ((interfaces . (font-interface text-interface self-alignment-interface dynamic-interface script-interface item-interface )))) )) (DynamicLineSpanner @@ -304,6 +325,7 @@ (X-extent-callback . ,Grob::point_dimension_callback) (breakable . #t) (space-alist . ( + (custos . (extra-space . 0.0)) (ambitus . (extra-space . 2.0)) (time-signature . (extra-space . 0.0)) (staff-bar . (extra-space . 0.0)) @@ -415,7 +437,9 @@ (stem-attachment-function . ,note-head-style->attachment-coordinates) (font-family . ancient) (style . mensural) - (meta . ((interfaces . (ligature-head-interface rhythmic-head-interface note-head-interface staff-symbol-referencer-interface)))) + (meta . ((interfaces . (ligature-head-interface rhythmic-head-interface + font-interface + note-head-interface staff-symbol-referencer-interface)))) )) (LyricHyphen @@ -441,7 +465,8 @@ (LyricText . ( (molecule-callback . ,Text_item::brew_molecule) - (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) + (X-offset-callbacks . (,Self_alignment_interface::centered_on_parent + ,Self_alignment_interface::aligned_on_self)) (self-alignment-X . 0) (word-space . 0.6) (ignore-length-mismatch . #f) @@ -449,6 +474,7 @@ (end-alignment . 2) (font-family . roman) (font-shape . upright) + ;; duh, side-position-interface? (meta . ((interfaces . (lyric-syllable-interface self-alignment-interface text-interface font-interface item-interface )))) )) @@ -460,7 +486,7 @@ (ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive) (molecule-callback . ,Mensural_ligature::brew_molecule) (font-family . ancient) - (meta . ((interfaces . (mensural-ligature-interface)))) + (meta . ((interfaces . (mensural-ligature-interface font-interface)))) )) (Porrectus @@ -486,6 +512,7 @@ (direction . 1) (breakable . #t) (font-family . roman) + (baseline-skip . 2) (break-visibility . ,end-of-line-invisible) (padding . 0.8) (meta . ((interfaces . (text-interface side-position-interface font-interface mark-interface self-alignment-interface item-interface )))) @@ -571,6 +598,8 @@ (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (molecule-callback . ,Text_item::brew_molecule) (font-shape . italic) + (padding . 0.4) + (font-relative-size . -2) (font-family . roman) (meta . ((interfaces . (text-interface self-alignment-interface side-position-interface font-interface item-interface )))) )) @@ -596,15 +625,17 @@ (extremity-offset-alist . ,default-phrasing-slur-extremity-offset-alist) (de-uglify-parameters . (1.5 0.8 -2.0)) (Y-extent-callback . ,Slur::height) - (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) - (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006) - (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2) - (bezier-area-steps . 1.0))) + (height-limit . 2.0) + (ratio . 0.333) (beautiful . 0.5) (y-free . 0.75) (attachment . (#f . #f)) (attachment-offset . ((0 . 0) . (0 . 0))) (slope-limit . 0.8) + (details . ((force-blowfit . 0.5) + (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006) + (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2) + (bezier-area-steps . 1.0))) (meta . ((interfaces . (slur-interface spanner-interface)))) )) @@ -707,15 +738,17 @@ (extremity-offset-alist . ,default-slur-extremity-offset-alist) (de-uglify-parameters . (1.5 0.8 -2.0)) (Y-extent-callback . ,Slur::height) - (details . ((height-limit . 2.0) (ratio . 0.333) (force-blowfit . 0.5) - (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006) - (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2) - (bezier-area-steps . 1.0))) + (height-limit . 2.0) + (ratio . 0.333) (beautiful . 0.5) (y-free . 0.75) (attachment . (#f . #f)) (attachment-offset . ((0 . 0) . (0 . 0))) (slope-limit . 0.8) + (details . ((force-blowfit . 0.5) + (bezier-pct-c0 . -0.2) (bezier-pct-c3 . 0.000006) + (bezier-pct-out-max . 0.8) (bezier-pct-in-max . 1.2) + (bezier-area-steps . 1.0))) (meta . ((interfaces . (slur-interface spanner-interface)))) )) @@ -749,7 +782,8 @@ (thin-kern . 3.0) (hair-thickness . 1.6) (thick-thickness . 6.0) - (meta . ((interfaces . (span-bar-interface bar-line-interface item-interface )))) + (meta . ((interfaces . (span-bar-interface font-interface + bar-line-interface item-interface )))) )) (StanzaNumber @@ -766,11 +800,13 @@ . ( (breakable . #t) (stem-spacing-correction . 0.4) + (knee-spacing-correction . 0.75) (meta . ((interfaces . (spacing-interface staff-spacing-interface item-interface )))) )) (NoteSpacing . ( (stem-spacing-correction . 0.5) + (knee-spacing-correction . 0.75) (meta . ((interfaces . (spacing-interface note-spacing-interface item-interface )))) )) @@ -778,7 +814,6 @@ . ( (molecule-callback . ,Staff_symbol::brew_molecule) (line-count . 5) - (ragged-right . #f) (layer . 0) (meta . ((interfaces . (staff-symbol-interface spanner-interface)))) )) @@ -801,6 +836,8 @@ . ( (axes . (1)) (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-offset-callbacks . (,Side_position_interface::aligned_side)) + (padding . 1.2) (minimum-space . 1.0) @@ -813,19 +850,49 @@ (before-line-breaking-callback . ,Stem::before_line_breaking) (molecule-callback . ,Stem::brew_molecule) (thickness . 1.3) - (beamed-lengths . (0.0 2.5 2.0 1.5)) - - ;; - (beamed-minimum-lengths . (0.0 1.5 1.25 1.0)) - - ;; Stems in unnatural (forced) direction should be shortened, - ;; according to [Roush & Gourlay]. Their suggestion to knock off - ;; a whole staffspace seems a bit drastical: we'll do half. + ;; 3.5 (or 3 measured from note head) is standar length + ;; 32nd, 64th flagged stems should be longer (lengths . (3.5 3.5 3.5 4.5 5.0)) + + ;; Stems in unnatural (forced) direction should be shortened by + ;; one staff space, according to [Roush & Gourlay]. + ;; Flagged stems we shorten only half a staff space. (stem-shorten . (1.0 0.5)) - ; if stem is on middle line, choose this direction. + + ;; default stem direction for note on middle line (neutral-direction . -1) + + ;; [Wanske]: standard length (but no shorter than minimum). + ;; (beamed-lengths . (3.5)) + + ;; FIXME. 3.5 yields too long beams (according to Ross and + ;; looking at Baerenreiter examples) for a number of common + ;; boundary cases. Subtracting half a beam thickness fixes + ;; this, but the bug may well be somewhere else. + (beamed-lengths . (3.26)) + + ;; [Wanske] lists three sets of minimum lengths. One + ;; set for the nomal case, and one set for beams with `der + ;; Balkenendpunkt weiter "uber bzw. unter die Systemgrenze + ;; hinaus (bei Gruppen mit grossem Tonumfang)' and the extreme + ;; case. + + ;; Note that Wanske lists numbers lengths starting from top of + ;; head, so we must add half a staff space. + + ;; We use the normal minima as minimum for the ideal lengths, + ;; and the extreme minima as abolute minimum length. + + ;; The 'normal' minima + (beamed-minimum-free-lengths . (2.5 2.0 1.5)) + + ;; The 'far outside staff' minima, not used + ;(beamed-far-minimum-free-lengths . (1.83)) + + ;; The 'extreme case' minima + (beamed-extreme-minimum-free-lengths . (1.83 1.5)) + (X-offset-callbacks . (,Stem::off_callback)) (X-extent-callback . ,Stem::dim_callback) (Y-extent-callback . ,Stem::height) @@ -843,7 +910,7 @@ (Y-extent-callback . ,Stem_tremolo::height) (X-extent-callback . #f) - (beam-width . 2.0) ; staff-space + (beam-width . 1.6) ; staff-space (beam-thickness . 0.48) ; staff-space (meta . ((interfaces . (stem-tremolo-interface item-interface )))) )) @@ -874,7 +941,8 @@ (SustainPedalLineSpanner . ( (axes . (1)) - (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-offset-callbacks . (,Side_position_interface::aligned_side)) (padding . 1.2) (minimum-space . 1.0) @@ -928,6 +996,7 @@ . ( (molecule-callback . ,Text_item::brew_molecule) (no-spacing-rods . #t) + (X-offset-callbacks . (,Self_alignment_interface::aligned_on_self)) (direction . -1) (padding . 0.5) (script-priority . 200) @@ -958,7 +1027,11 @@ (molecule-callback . ,tablature-molecule-callback) (Y-offset-callbacks . (,Staff_symbol_referencer::callback)) (stem-attachment-function . ,tablature-stem-attachment-function) - (meta . ((interfaces . (rhythmic-head-interface font-interface note-head-interface staff-symbol-referencer-interface item-interface )))) + (meta . ((interfaces + . (rhythmic-head-interface + font-interface + note-head-interface staff-symbol-referencer-interface + text-interface item-interface )))) )) @@ -1034,6 +1107,8 @@ . ( (axes . (1)) (Y-extent-callback . ,Axis_group_interface::group_extent_callback) + (Y-offset-callbacks . (,Side_position_interface::aligned_side)) + (padding . 1.2) (minimum-space . 1.0) (direction . -1) @@ -1079,7 +1154,6 @@ (define (completize-grob-entry x) "transplant assoc key into 'name entry of 'meta of X " - (let* ((name-sym (car x)) (grob-entry (cdr x)) (metaentry (cdr (assoc 'meta grob-entry))) @@ -1105,7 +1179,8 @@ (map (lambda (x) ; (display (car x)) (newline) - (set-object-property! (car x) 'translation-type? list?)) + (set-object-property! (car x) 'translation-type? list?) + (set-object-property! (car x) 'is-grob? #t)) all-grob-descriptions)