From fe2ea684b9dcdd98146d608a43e27acc881ff3cd Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Tue, 24 Aug 2004 22:17:20 +0000 Subject: [PATCH] (print): always start from right edge of a broken bound. This fixes ottava-clef.ps --- ChangeLog | 5 +++++ input/regression/ottava-broken.ly | 26 +++++++++++++------------- lily/ottava-bracket.cc | 14 +++++++++----- lily/script-engraver.cc | 4 ++++ scm/define-grob-properties.scm | 6 ++++-- scm/script.scm | 2 ++ 6 files changed, 37 insertions(+), 20 deletions(-) diff --git a/ChangeLog b/ChangeLog index c69eaf0847..f4d4637064 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-08-25 Han-Wen Nienhuys + + * lily/ottava-bracket.cc (print): always start from right edge of + a broken bound. This fixes ottava-clef.ps + 2004-08-24 Han-Wen Nienhuys * input/regression/slur-script-inside.ly: new file. diff --git a/input/regression/ottava-broken.ly b/input/regression/ottava-broken.ly index e03b138e12..37744a3fd4 100644 --- a/input/regression/ottava-broken.ly +++ b/input/regression/ottava-broken.ly @@ -3,23 +3,23 @@ \header { -texidoc = "At line breaks, ottava brackets have no vertical line and -their horizontal line does not stick out." - +texidoc = "At line breaks, ottava brackets have no vertical line and +their horizontal line does not stick out. The dashed line runs until +the end of the line (regardless of prefatory matter). +" } + \version "2.3.4" -\paper { raggedright = ##t} -\score { - \relative c''' { - a2 b - #(set-octavation 1) - a2 b \break c''1 \break - a - #(set-octavation 0) - g,,2 b c a -} +\paper { raggedright = ##t } +\relative c''' { + a2 b + #(set-octavation 1) + a2 b \time 3/4 \break c''2. \break + a + #(set-octavation 0) + g,,2 b4 c2 a4 } diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index aadf68a55b..ef2df3a9f7 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -95,16 +95,20 @@ Ottava_bracket::print (SCM smob) } } } - + if (ext.is_empty ()) { - Real x = b->relative_coordinate (common, X_AXIS); - ext = Interval (x,x); + ext = robust_relative_extent (b, common, X_AXIS); } - span_points[d] = (broken [d]) ? b->extent (common, X_AXIS)[-d] : ext[d]; if (broken[d]) - shorten [d] = 0.0; + { + span_points[d] = b->extent (common, X_AXIS)[RIGHT]; + shorten[d] = 0.; + } + + else + span_points[d] = ext[d]; } while (flip (&d) != LEFT); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 0cf404e7b1..2a463b581f 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -116,6 +116,10 @@ void make_script_from_event (Grob *p, bool * follow, Context *tg, for (SCM s = art ; ly_c_pair_p (s); s = ly_cdr (s)) { SCM sym = ly_caar (s); + SCM type = scm_object_property (sym, ly_symbol2scm ("backend-type?")); + if (!ly_c_procedure_p (type)) + continue; + SCM val = ly_cdar (s); if (sym == ly_symbol2scm ("script-priority")) diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 25cb667623..5b41d46360 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -287,7 +287,9 @@ slur, the closer it is to this height.") (horizontal-shift ,integer? "An integer that identifies ranking of note-column for horizontal shifting. This is used by @internalsref{note-collision-interface}.") - (inside-slur ,boolean? "If set, this object should be inside the slur") + (inside-slur ,boolean? "If set, this script should be inside the +slur. If set to false, the script places itself around the slur. If +unset, script and slur ignore each other ") (inspect-quants ,number-pair? "If debugging is set, set beam quant to this position, and print the respective scores.") @@ -633,7 +635,7 @@ empirical.") (interfaces ,list? "list of symbols indicating the interfaces supported by this object. Is initialized from the @code{meta} field.") (shorten ,ly:dimension? "The amount of space that a stem. Internally used to distribute beam shortening over stems. ") - + (slur ,ly:grob? "A pointer to a slur object") (use-breve-rest ,boolean? "Use breve rests for measures longer than a whole rest.") diff --git a/scm/script.scm b/scm/script.scm index 2da8149027..f1254b161e 100644 --- a/scm/script.scm +++ b/scm/script.scm @@ -57,6 +57,7 @@ (direction . 1))) ("fermata" . ((script-stencil . (feta . ("dfermata" . "ufermata"))) + (inside-slur . #f) (direction . 1))) ("shortfermata" . ((script-stencil . (feta . ("dshortfermata" . "ushortfermata"))) @@ -79,6 +80,7 @@ ("tenuto" . ((script-stencil . (feta . ("tenuto" . "tenuto"))) (follow-into-staff . #t) + (inside-slur . #t) (side-relative-direction . -1))) ("comma" . ((script-stencil . (feta . ("lcomma" . "rcomma"))) -- 2.39.5