]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge commit 'origin' into jneeman4
authorJoe Neeman <joeneeman@gmail.com>
Wed, 23 Apr 2008 23:35:28 +0000 (09:35 +1000)
committerJoe Neeman <joeneeman@gmail.com>
Wed, 23 Apr 2008 23:35:28 +0000 (09:35 +1000)
flower/include/yaffut.hh
flower/test-file-path.cc
input/regression/ragged-right-compressed.ly [new file with mode: 0644]
input/regression/ragged-right-disabled.ly [new file with mode: 0644]
input/regression/ragged-right-one-line.ly [new file with mode: 0644]
lily/constrained-breaking.cc
lily/note-collision.cc

index 06434b03324ad0b334b318065014cb95a4d1cbd7..e324922b69738c60abbc17c7ab88b46ef3b789b8 100644 (file)
@@ -9,7 +9,9 @@
 #include <cxxabi.h>
 
 #include <cmath>
+#include <cstring>
 #include <iostream>
+#include <limits>
 #include <map>
 #include <memory>
 #include <sstream>
index 053d237b66eec07064aa412a6b69dba81b89759c..fb2f3f2f65a7a5202432cb5d16e86c7f5bd500e4 100644 (file)
@@ -1,5 +1,7 @@
 #include "file-path.hh"
 
+#include <limits.h>
+
 #include "yaffut.hh"
 #include "config.hh"
 
diff --git a/input/regression/ragged-right-compressed.ly b/input/regression/ragged-right-compressed.ly
new file mode 100644 (file)
index 0000000..dfd896b
--- /dev/null
@@ -0,0 +1,8 @@
+\version "2.11.44"
+
+\header {
+  texidoc = "When a score takes up only a single line and it is compressed, it
+is not printed as ragged."
+}
+
+{ \repeat unfold 9 {a b c d} }
\ No newline at end of file
diff --git a/input/regression/ragged-right-disabled.ly b/input/regression/ragged-right-disabled.ly
new file mode 100644 (file)
index 0000000..3ceb5d4
--- /dev/null
@@ -0,0 +1,12 @@
+\version "2.11.44"
+
+\header {
+  texidoc = "When ragged-right is specifically disabled, a score with only one
+line will not be printed as ragged."
+}
+
+\paper {
+  ragged-right = ##f
+}
+
+{ a b c d }
\ No newline at end of file
diff --git a/input/regression/ragged-right-one-line.ly b/input/regression/ragged-right-one-line.ly
new file mode 100644 (file)
index 0000000..35dd3c6
--- /dev/null
@@ -0,0 +1,8 @@
+\version "2.11.44"
+
+\header {
+  texidoc = "When a score takes up only a single line and it is stretched, it
+is printed as ragged by default."
+}
+
+{ a b c d }
\ No newline at end of file
index 1efae87e125047bdd317595a6124408fc5c98e4f..9a1d261159feb47519de5deffda780de0adabcb7 100644 (file)
@@ -123,6 +123,15 @@ Constrained_breaking::space_line (vsize i, vsize j)
   bool last = j == breaks_.size () - 1;
   bool ragged = ragged_right || (last && ragged_last);
 
+  /* As a special case, if there is only one line in the score and ragged-right
+     hasn't been specifically forbidden and the line is stretched, use
+     ragged spacing. */
+  if (last && i == 0
+      && lines_.at (i, j).force_ >= 0
+      && !scm_is_bool (pscore_->layout ()->c_variable ("ragged-right"))
+      && !scm_is_bool (pscore_->layout ()->c_variable ("ragged-last")))
+    ragged = true;
+
   return get_line_configuration (line, line_dims[RIGHT] - line_dims[LEFT], line_dims[LEFT], ragged);
 }
 
index cdeb36c667078a50755aff5739c9c717776b3294..1b71f3f72d4dcc5caaa39c8cd940163e8b08d01d 100644 (file)
@@ -81,6 +81,8 @@ check_meshing_chords (Grob *me,
       && !to_boolean (me->get_property ("merge-differently-headed")))
     merge_possible = false;
 
+  /* what's this for? In particular, why do we check merge_possible when we
+     haven't finished determining it yet? --jneem */
   if (merge_possible
       && head_up->get_property ("style") == ly_symbol2scm ("fa")
       && head_down->get_property ("style") == ly_symbol2scm ("fa"))