From: Keith OHara Date: Thu, 17 Feb 2011 20:45:34 +0000 (-0800) Subject: Fix 1229 Ensure space around prefatory matter X-Git-Tag: release/2.13.51-1~27 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=6d751144f402dc58ff3f65df0fcaab021a86908c;p=lilypond.git Fix 1229 Ensure space around prefatory matter NonMusicalPaperColumn gets skyline padding to prevent notes from overlapping Clef and KeySignature get extra-spacing-width for separation from accidentals --- diff --git a/input/regression/lyrics-bar.ly b/input/regression/lyrics-bar.ly index a5067687e9..ead137c1dd 100644 --- a/input/regression/lyrics-bar.ly +++ b/input/regression/lyrics-bar.ly @@ -12,26 +12,28 @@ lyrics do not collide with barlines. } << - \new Staff \with - { -% \remove "Bar_engraver" - } - { + \new Staff { b1 \bar "|:" b1 \bar ":|" } \context Lyrics \with { \consists "Bar_engraver" \consists "Separating_line_group_engraver" - \override BarLine #'bar-extent = #'(-2 . 2) } \lyricmode { looooooooooooooooooooooooooooooooooong1 syllable } \lyrics { - no Bar_Engraver_Bar_Engraver_Bar_Engraver + no Bar_Engraver_Bar_Engraver_Bar_Engraver + } + \new Staff { + b1 b1 } - \new Staff \with { -% \remove "Bar_engraver" - } { b1 b1 } >> - +\layout { + \context { + \Lyrics + \override VerticalAxisGroup #'nonstaff-nonstaff-spacing #'minimum-distance = #4 + \override LyricText #'Y-offset = #-0.7 + \override BarLine #'bar-extent = #'(-2 . 2) + } +} diff --git a/input/regression/prefatory-separation.ly b/input/regression/prefatory-separation.ly new file mode 100644 index 0000000000..5175fb0bbd --- /dev/null +++ b/input/regression/prefatory-separation.ly @@ -0,0 +1,27 @@ +\version "2.13.50" + +\header { + + texidoc = "Prefatory items maintain sufficient separation from + musical notation for readability, even in tight spacing. + The notes should remain generally on the correct side of the + time signature, key signature and barlines. A key change to + G major should be legible." + +} + +\new Staff << + \relative c''' { + \key f \major + es4 c c c \bar "||" \noBreak + \key g \major + 4 r2. \bar "|." + } \\ + \relative c' { + R1 + r4 cis a a + } +>> +\layout { + line-width = 5\cm % impossibly narrow to induce tight spacing +} diff --git a/input/regression/stem-length-estimation.ly b/input/regression/stem-length-estimation.ly index 18697f726b..4cfc89d7f6 100644 --- a/input/regression/stem-length-estimation.ly +++ b/input/regression/stem-length-estimation.ly @@ -16,6 +16,7 @@ This example should fit snugly on one page. \paper { #(set-paper-size "a6") tagline = ##f + indent = #0 system-system-spacing = #'((padding . 1.2)) oddHeaderMarkup = \markup \on-the-fly #assert-single-page \null } diff --git a/lily/skyline.cc b/lily/skyline.cc index 608155ea3d..fe30291f78 100644 --- a/lily/skyline.cc +++ b/lily/skyline.cc @@ -239,6 +239,10 @@ empty_skyline (list *const ret) ret->push_front (Building (-infinity_f, -infinity_f, -infinity_f, infinity_f)); } +/* + Given Building 'b' with starting wall location 'start', extend each side + with a sloped roofline of width 'horizon_padding'; put the skyline in 'ret' +*/ static void single_skyline (Building b, Real start, Real horizon_padding, list *const ret) { @@ -330,7 +334,8 @@ Skyline::internal_build_skyline (list *boxes, Real horizon_padding, Axis ho { list result; single_skyline (Building (boxes->front (), horizon_padding, horizon_axis, sky), - boxes->front ()[horizon_axis][LEFT], horizon_padding, &result); + boxes->front ()[horizon_axis][LEFT] - horizon_padding, + horizon_padding, &result); return result; } @@ -443,7 +448,8 @@ Skyline::Skyline (Box const &b, Real horizon_padding, Axis horizon_axis, Directi { sky_ = sky; Building front (b, horizon_padding, horizon_axis, sky); - single_skyline (front, b[horizon_axis][LEFT], horizon_padding, &buildings_); + single_skyline (front, b[horizon_axis][LEFT] - horizon_padding, + horizon_padding, &buildings_); } void @@ -477,7 +483,8 @@ Skyline::insert (Box const &b, Real horizon_padding, Axis a) return; my_bld.splice (my_bld.begin (), buildings_); - single_skyline (Building (b, horizon_padding, a, sky_), b[a][LEFT], horizon_padding, &other_bld); + single_skyline (Building (b, horizon_padding, a, sky_), b[a][LEFT] - horizon_padding, + horizon_padding, &other_bld); internal_merge_skyline (&other_bld, &my_bld, &buildings_); } diff --git a/scm/define-grobs.scm b/scm/define-grobs.scm index 92edba5f1d..15a2695e5f 100644 --- a/scm/define-grobs.scm +++ b/scm/define-grobs.scm @@ -1019,6 +1019,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 @@ -1042,6 +1043,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 @@ -1318,7 +1320,8 @@ (before-line-breaking . ,ly:paper-column::before-line-breaking) (full-measure-extra-space . 1.0) (horizontal-skylines . ,ly:separation-item::calc-skylines) - (skyline-vertical-padding . 0.15) + ;; sufficient padding to prevent ledger lines from moving over/under + (skyline-vertical-padding . 0.6) ;; (stencil . ,ly:paper-column::print) (line-break-permission . allow)