X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=scm%2Fdefine-grobs.scm;h=aa761fce54ca5a3b51ea76ed390fbc0039f466b0;hb=05d8315484c180e02bf9297513bd0c3db1e4615a;hp=9a43c08933dcb46dd6676ae71d27b9fe37673ab1;hpb=4b7d95665a24a10d6b893df83152d4bc9a7fb055;p=lilypond.git diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 9a43c08933..aa761fce54 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1,9 +1,20 @@ -;;;; define-grobs.scm -- +;;;; This file is part of LilyPond, the GNU music typesetter. ;;;; -;;;; source file of the GNU LilyPond music typesetter -;;;; -;;;; (c) 1998--2009 Han-Wen Nienhuys +;;;; Copyright (C) 1998--2010 Han-Wen Nienhuys ;;;; Jan Nieuwenhuizen +;;;; +;;;; LilyPond is free software: you can redistribute it and/or modify +;;;; it under the terms of the GNU General Public License as published by +;;;; the Free Software Foundation, either version 3 of the License, or +;;;; (at your option) any later version. +;;;; +;;;; LilyPond is distributed in the hope that it will be useful, +;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;;; GNU General Public License for more details. +;;;; +;;;; You should have received a copy of the GNU General Public License +;;;; along with LilyPond. If not, see . ;;;; distances are given in line-thickness (thicknesses) and ;;;; staff-space (distances) @@ -107,7 +118,6 @@ (AmbitusAccidental . ( (direction . ,LEFT) - (font-family . music) (glyph-name-alist . ,standard-alteration-glyph-name-alist) (padding . 0.5) (side-axis . ,X) @@ -122,14 +132,13 @@ (AmbitusLine . ( - (join-heads . #t) - (stencil . ,ly:ambitus::print) + (gap . 0.35) + (stencil . ,ambitus::print) (thickness . 2) (X-offset . ,ly:self-alignment-interface::centered-on-x-parent) (meta . ((class . Item) (interfaces . (ambitus-interface - font-interface - staff-symbol-referencer-interface)))))) + font-interface)))))) (AmbitusNoteHead . ( @@ -156,7 +165,6 @@ (stencil . ,ly:arpeggio::print) (X-extent . ,ly:arpeggio::width) (X-offset . ,ly:side-position-interface::x-aligned-side) - (Y-extent . ,ly:arpeggio::height) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) (interfaces . (arpeggio-interface @@ -216,6 +224,7 @@ (BarNumber . ( + (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff) ;; want the bar number before the clef at line start. (break-align-symbols . (left-edge staff-bar)) @@ -259,7 +268,6 @@ (padding . 0.2) (positioning-done . ,ly:align-interface::align-to-minimum-distances) (stacking-dir . ,DOWN) - (threshold . (2 . 1000)) (Y-extent . ,ly:axis-group-interface::height) (meta . ((class . Spanner) (interfaces . (align-interface @@ -310,6 +318,7 @@ ;; rather long. (auto-knee-gap . 5.5) + (beam-thickness . 0.48) ; in staff-space ;; We have some unreferenced problems here. ;; @@ -367,9 +376,6 @@ (shorten . ,ly:beam::calc-stem-shorten) (stencil . ,ly:beam::print) - ;; TODO: should be in SLT. - (thickness . 0.48) ; in staff-space - (meta . ((class . Spanner) (object-callbacks . ((normal-stems . ,ly:beam::calc-normal-stems))) (interfaces . (beam-interface @@ -484,7 +490,6 @@ (break-align-anchor . ,ly:break-aligned-interface::calc-extent-aligned-anchor) (break-align-symbol . clef) (break-visibility . ,begin-of-line-visible) - (font-family . music) (glyph-name . ,ly:clef::calc-glyph-name) (non-musical . #t) (space-alist . ((ambitus . (extra-space . 2.0)) @@ -528,6 +533,7 @@ (direction . ,UP) (extra-spacing-width . (+inf.0 . -inf.0)) (font-series . bold) + (outside-staff-priority . 450) (padding . 0.5) (script-priority . 200) (side-axis . ,Y) @@ -601,7 +607,7 @@ (DoublePercentRepeatCounter . ( (direction . ,UP) - (font-encoding . fetaNumber) + (font-encoding . fetaText) (font-size . -2) (padding . 0.2) (self-alignment-X . ,CENTER) @@ -650,11 +656,12 @@ (direction . ,ly:script-interface::calc-direction) (extra-spacing-width . (+inf.0 . -inf.0)) - (font-encoding . fetaDynamic) + (font-encoding . fetaText) (font-series . bold) (font-shape . italic) (outside-staff-priority . 250) (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) @@ -662,6 +669,7 @@ (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self) (meta . ((class . Item) (interfaces . (dynamic-interface + dynamic-text-interface font-interface script-interface self-alignment-interface @@ -669,6 +677,7 @@ (DynamicTextSpanner . ( + (before-line-breaking . ,dynamic-text-spanner::before-line-breaking) (bound-details . ((right . ((attach-dir . ,LEFT) (Y . 0) (padding . 0.75) @@ -679,8 +688,8 @@ (left . ((attach-dir . ,LEFT) (Y . 0) - (stencil-offset . (0 . -0.5)) - (padding . 0.5) + (stencil-offset . (-0.75 . -0.5)) + (padding . 0.75) )) (left-broken . ((attach-dir . ,RIGHT) )) @@ -713,6 +722,33 @@ text-interface)))))) + (Episema + . ( + (bound-details . ((left . ((Y . 0) + (padding . 0) + (attach-dir . ,LEFT) + )) + (right . ((Y . 0) + (padding . 0) + (attach-dir . ,RIGHT) + )) + )) + (direction . ,UP) + (left-bound-info . ,ly:line-spanner::calc-left-bound-info) + (quantize-position . #t) + (right-bound-info . ,ly:line-spanner::calc-right-bound-info) + (side-axis . ,Y) + (stencil . ,ly:line-spanner::print) + (style . line) + (Y-offset . ,ly:side-position-interface::y-aligned-side) + (meta . ((class . Spanner) + (interfaces . (episema-interface + font-interface + line-interface + line-spanner-interface + side-position-interface)))))) + + (Fingering . ( @@ -721,7 +757,7 @@ (avoid-slur . around) (cross-staff . ,ly:side-position-interface::calc-cross-staff) (direction . ,ly:script-interface::calc-direction) - (font-encoding . fetaNumber) + (font-encoding . fetaText) (font-size . -5) ; don't overlap when next to heads. (padding . 0.5) (positioning-done . ,ly:script-interface::calc-positioning-done) @@ -822,7 +858,6 @@ (stencil . ,ly:hairpin::print) (thickness . 1.0) (to-barline . #t) - (Y-extent . ,ly:hairpin::height) (Y-offset . ,ly:self-alignment-interface::y-aligned-on-self) (meta . ((class . Spanner) (interfaces . (dynamic-interface @@ -942,14 +977,14 @@ (height-limit . 1.0))) (direction . ,ly:tie::calc-direction) (head-direction . ,LEFT) - (stencil . ,ly:tie::print) + (stencil . ,laissez-vibrer::print) (thickness . 1.0) (meta . ((class . Item) (interfaces . (semi-tie-interface)))))) (LaissezVibrerTieColumn . ( - (head-direction . ,LEFT) + (head-direction . ,ly:semi-tie-column::calc-head-direction) (positioning-done . ,ly:semi-tie-column::calc-positioning-done) (X-extent . #f) (Y-extent . #f) @@ -983,7 +1018,7 @@ (clef . (extra-space . 0.8)) (first-note . (fixed-space . 2.0)) (right-edge . (extra-space . 0.0)) - (key-signature . (extra-space . 0.0)) + (key-signature . (extra-space . 0.8)) (key-cancellation . (extra-space . 0.0)) )) (X-extent . (0 . 0)) @@ -1097,6 +1132,7 @@ (MetronomeMark . ( + (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff) (direction . ,UP) (extra-spacing-width . (+inf.0 . -inf.0)) (outside-staff-priority . 1000) @@ -1131,7 +1167,7 @@ . ( (bound-padding . 2.0) (direction . ,UP) - (font-encoding . fetaNumber) + (font-encoding . fetaText) (padding . 0.4) (self-alignment-X . ,CENTER) (side-axis . ,Y) @@ -1349,7 +1385,7 @@ (PercentRepeatCounter . ( (direction . ,UP) - (font-encoding . fetaNumber) + (font-encoding . fetaText) (font-size . -2) (padding . 0.2) (self-alignment-X . ,CENTER) @@ -1404,6 +1440,7 @@ (RehearsalMark . ( + (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff) (baseline-skip . 2) (break-align-symbols . (staff-bar clef)) (break-visibility . ,end-of-line-invisible) @@ -1517,16 +1554,6 @@ (meta . ((class . Item) (interfaces . (script-column-interface)))))) - (SeparationItem - . ( - (avoid-slur . inside) - (horizontal-skylines . ,ly:separation-item::calc-skylines) - (stencil . ,ly:separation-item::print) - (X-extent . ,ly:axis-group-interface::width) - (Y-extent . ,ly:axis-group-interface::height) - (meta . ((class . Item) - (interfaces . (separation-item-interface)))))) - (Slur . ( (avoid-slur . inside) @@ -1620,8 +1647,12 @@ (StaffGrouper . ( - (between-staff-spacing . ((space . 9) (minimum-distance . 7))) - (after-last-staff-spacing . ((space . 10.5) (minimum-distance . 8))) + (between-staff-spacing . ((space . 9) + (minimum-distance . 7) + (padding . 1))) + (after-last-staff-spacing . ((space . 10.5) + (minimum-distance . 8) + (padding . 1))) (meta . ((class . Spanner) (interfaces . (staff-grouper-interface)))))) @@ -1727,7 +1758,7 @@ (StringNumber . ( (avoid-slur . around) - (font-encoding . fetaNumber) + (font-encoding . fetaText) (font-size . -5) ; don't overlap when next to heads. (padding . 0.5) (script-priority . 100) @@ -1868,12 +1899,17 @@ (TabNoteHead . ( + (details . ((tied-properties . ((break-visibility . ,begin-of-line-visible) + (parenthesize . #t))) + (repeat-tied-properties . ((note-head-visible . #t) + (parenthesize . #t))))) (direction . ,CENTER) (duration-log . ,note-head::calc-duration-log) (font-series . bold) (font-size . -2) (stem-attachment . (0.0 . 1.35)) (stencil . ,ly:text-interface::print) + (whiteout . #t) (X-offset . ,ly:self-alignment-interface::x-aligned-on-self) (Y-offset . ,ly:staff-symbol-referencer::callback) (meta . ((class . Item) @@ -1882,6 +1918,7 @@ rhythmic-grob-interface rhythmic-head-interface staff-symbol-referencer-interface + tab-note-head-interface text-interface)))))) (TextScript @@ -1919,6 +1956,7 @@ (padding . 0.25) (attach-dir . ,LEFT) )) + (left-broken . ((end-on-note . #t))) (right . ((Y . 0) (padding . 0.25) )) @@ -2056,17 +2094,11 @@ (TrillSpanner . ( (after-line-breaking . ,ly:spanner::kill-zero-spanned-time) - (bound-details . ((left . ((text . ,(make-translate-scaled-markup - '(0.0 . -1.0) - (make-musicglyph-markup "scripts.trill"))) + (bound-details . ((left . ((text . ,(make-musicglyph-markup "scripts.trill")) (Y . 0) - (stencil-offset . (-0.5 . 0)) - (padding . 1.5) + (stencil-offset . (-0.5 . -1)) + (padding . 0.5) (attach-dir . ,CENTER) - ;; this isn't CENTER because the trill glyph's origin - ;; is not centered in its extent; to have the trill - ;; spanner aligned the same as a trill, we need a slight offset - (anchor-alignment . 0.15) )) (left-broken . ((end-on-note . #t))) (right . ((Y . 0))) @@ -2180,8 +2212,11 @@ . ( (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights) (axes . (,Y)) - (default-next-staff-spacing . ((space . 9) (minimum-distance . 8))) + (default-next-staff-spacing . ((space . 9) + (minimum-distance . 8) + (padding . 1))) (next-staff-spacing . ,ly:axis-group-interface::calc-next-staff-spacing) + (non-affinity-spacing . ((padding . 0.5))) (stencil . ,ly:axis-group-interface::print) (vertical-skylines . ,ly:hara-kiri-group-spanner::calc-skylines) (X-extent . ,ly:axis-group-interface::width) @@ -2219,10 +2254,10 @@ . ( (direction . ,UP) (edge-height . (2.0 . 2.0)) ;; staff-space; - (font-encoding . fetaNumber) + (font-encoding . fetaText) (font-size . -4) (stencil . ,ly:volta-bracket-interface::print) - (thickness . 1.6) ;; line-thickness + (thickness . 1.6) ;; line-thickness (word-space . 0.6) (meta . ((class . Spanner) (interfaces . (font-interface @@ -2230,14 +2265,16 @@ line-interface side-position-interface text-interface - volta-bracket-interface)))))) + volta-bracket-interface + volta-interface)))))) (VoltaBracketSpanner . ( + (after-line-breaking . ,ly:side-position-interface::move-to-extremal-staff) (axes . (,Y)) (direction . ,UP) - (no-alignment . ,#t) - (outside-staff-priority . 100) + (no-alignment . #t) + (outside-staff-priority . 600) (padding . 1) (side-axis . ,Y) (X-extent . ,ly:axis-group-interface::width) @@ -2245,7 +2282,8 @@ (Y-offset . ,ly:side-position-interface::y-aligned-side) (meta . ((class . Spanner) (interfaces . (axis-group-interface - side-position-interface)))))) + side-position-interface + volta-interface)))))) )) @@ -2256,10 +2294,10 @@ ;; (newline) (let* ((name-sym (car x)) (grob-entry (cdr x)) - (meta-entry (cdr (assoc 'meta grob-entry))) - (class (cdr (assoc 'class meta-entry))) + (meta-entry (assoc-get 'meta grob-entry)) + (class (assoc-get 'class meta-entry)) (ifaces-entry - (cdr (assoc 'interfaces meta-entry)))) + (assoc-get 'interfaces meta-entry))) (cond ((eq? 'Item class) @@ -2299,13 +2337,21 @@ (set! all-grob-descriptions (sort all-grob-descriptions alist