]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/gourlay-breaking.cc
* ly/engraver-init.ly (AncientRemoveEmptyStaffContext): move
[lilypond.git] / lily / gourlay-breaking.cc
index 157fda61605a6dbcf785ca2d55c8627c7c4ef2aa..b4657f893ada1c0ea373e93032056f45f534500a 100644 (file)
@@ -231,18 +231,21 @@ Gourlay_breaking::combine_demerits (Column_x_positions const &prev,
          break_penalties += gh_scm2double (pen);
        }
     }
+
   /*
-    Q: do want globally non-cramped lines, or locally equally cramped lines. 
+    Q: do we want globally non-cramped lines, or locally equally
+    cramped lines?
+
+    There used to be an example file input/test/uniform-breaking to
+    demonstrate problems with this approach. When music is gradually
+    becoming denser, the uniformity requirement makes lines go from
+    cramped to even more cramped (because going from cramped
+    3meas/line to relatively loose 2meas/line is such a big step.
+    
    */
+
   Real demerit = abs (this_one.force_) +  abs (prev.force_ - this_one.force_)
     + break_penalties;
-
-  /*
-    This is rather ugly (not scale free), but we have to put a
-    penalty breaking two zero-force lines. Otherwise, we don't get a
-    unique solution (i.e.: line-breaks in short raggedright
-    fragments.)
-  */
   
   if (!this_one.satisfies_constraints_b_)
      {