]> git.donarmstrong.com Git - lilypond.git/commitdiff
FiguredBass: Extenders for figs of different width should stop at same position
authorReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 24 Nov 2010 15:50:23 +0000 (16:50 +0100)
committerValentin Villenave <valentin@villenave.net>
Fri, 26 Nov 2010 23:08:51 +0000 (00:08 +0100)
FB extenders use the extent of the hidden figure grob, so extenders
of different figures might stop at different positions. Ideally, the
note of the associated staff should be retrieved and used as the
position to stop the extender. However, FB can also exist standalone
without any attached staff.

So, as a workaround, this patch simply sets the text of all hidden
figures to 0, so they all have the same extent and all extenders will
stop at the same position.

input/regression/figured-bass-continuation-end-position.ly [new file with mode: 0644]
lily/figured-bass-engraver.cc

diff --git a/input/regression/figured-bass-continuation-end-position.ly b/input/regression/figured-bass-continuation-end-position.ly
new file mode 100644 (file)
index 0000000..3456b3c
--- /dev/null
@@ -0,0 +1,18 @@
+\version "2.13.41"
+
+\header {
+  texidoc = "Figured bass extender for figures of different width (e.g. with
+alteration or two-digit figures) should still stop at the same position."
+
+}
+
+\figures {
+  \set useBassFigureExtenders = ##t
+  \set figuredBassAlterationDirection = #RIGHT
+  <6 5+ 3>4.
+  <6 5+ 2>4.
+  r4
+  <12 5>4.
+  <12 5>4.
+  r4
+}
\ No newline at end of file
index 3f173c99866e618d918325a604f116a1f840e27c..b4c92f8862060ac3c8270f9b76672b3f6f107c20 100644 (file)
@@ -459,8 +459,12 @@ Figured_bass_engraver::create_grobs ()
         {
           /*
             UGH should connect to the bass staff, and get the note heads.
+            For now, simply set the hidden figure to a default value to
+            ensure the extenders of different figures always end at the same
+            position, e.g. in <12 5> <12 5>
           */
           group.figure_item_->set_property ("transparent", SCM_BOOL_T);
+          group.figure_item_->set_property ("text", ly_string2scm ("0"));
           group.continuation_line_->set_bound (RIGHT, group.figure_item_);
         }