]> git.donarmstrong.com Git - lilypond.git/commitdiff
Fix 614.
authorMatthew Rowles <rowlesmr@gmail.com>
Sat, 17 May 2008 11:11:13 +0000 (21:11 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Sat, 17 May 2008 11:11:13 +0000 (21:11 +1000)
Unless an ottava bracket occurs directly after a line break, allow its left
edge to have non-zero height.

input/regression/ottava-edge.ly [new file with mode: 0644]
lily/ottava-bracket.cc

diff --git a/input/regression/ottava-edge.ly b/input/regression/ottava-edge.ly
new file mode 100644 (file)
index 0000000..314d5f9
--- /dev/null
@@ -0,0 +1,43 @@
+
+\header
+{
+  texidoc = 
+  "Both edge heights of an ottava bracket can be specified."
+}
+\version "2.11.45"
+
+
+\layout { ragged-right = ##t} 
+
+\relative c'''  {
+
+  %standard ottavation
+  #(set-octavation 1)
+  a b c
+  #(set-octavation 0)
+  a
+  
+  %override the left edge height to produce standard text with a left edge
+  #(set-octavation 1)
+  \once \override Staff.OttavaBracket #'edge-height = #'(1.2 . 1.2)
+  a b c
+  #(set-octavation 0)
+  a
+  
+  % Look! we can make them go up!
+  #(set-octavation 1)
+  \once \override Staff.OttavaBracket #'edge-height = #'(-1 . -1)
+  a b c
+  #(set-octavation 0)
+  a
+  
+  % and have them go in different directions
+  #(set-octavation 1)
+  \once \override Staff.OttavaBracket #'edge-height = #'(-1.2 . 1.2)
+  a b c
+  #(set-octavation 0)
+  a
+}
+
+
index a2ed6b54227bdb2c85f493f0d3daa44b44b43bad..82218145315cfc32cdd3b5c01b2694a130c45c6e 100644 (file)
@@ -132,10 +132,13 @@ Ottava_bracket::print (SCM smob)
   Drul_array<Real> flare = robust_scm2interval (me->get_property ("bracket-flare"),
                                                Interval (0, 0));
 
-  edge_height[LEFT] = 0.0;
-  edge_height[RIGHT] *= -get_grob_direction (me);
-  if (broken[RIGHT])
-    edge_height[RIGHT] = 0.0;
+  do
+    {
+      edge_height[d] *= -get_grob_direction (me);
+      if (broken[d])
+       edge_height[d] = 0.0;
+    }
+  while (flip(&d) != LEFT);
 
   Stencil b;
   Interval empty;