On Mon, 2006-06-05 at 02:36 +0200, Han-Wen Nienhuys wrote:
> Hi there,
> 
> the first test results are finally available. Grovel at
> 
>    http://lilypond.org/doc/v2.9/v2.8.4/index.html
> 
> and see what features we broken in the latest release!

Awesome! This patch fixes spacing-stick-out.ly, can I apply it?

Also, how can I get this running in my working copy?
Index: ChangeLog
===================================================================
RCS file: /sources/lilypond/lilypond/ChangeLog,v
retrieving revision 1.5076
diff -u -r1.5076 ChangeLog
--- ChangeLog	5 Jun 2006 00:52:53 -0000	1.5076
+++ ChangeLog	5 Jun 2006 01:38:33 -0000
@@ -1,3 +1,11 @@
+2006-06-05  Joe Neeman  <[EMAIL PROTECTED]>
+
+	* lily/simple-spacer.cc (get_line_configuration): add the
+	keep-inside-line rods.
+
+	* lily/simple-spacer.cc (get_line_forces): check for forced
+	line-breaks here also.
+
 2006-06-05  Han-Wen Nienhuys  <[EMAIL PROTECTED]>
 
 	* buildscripts/output-distance.py (main): use compare-XXX for
Index: lily/simple-spacer.cc
===================================================================
RCS file: /sources/lilypond/lilypond/lily/simple-spacer.cc,v
retrieving revision 1.98
diff -u -r1.98 simple-spacer.cc
--- lily/simple-spacer.cc	9 May 2006 02:15:56 -0000	1.98
+++ lily/simple-spacer.cc	5 Jun 2006 01:38:33 -0000
@@ -305,6 +305,7 @@
   Real inverse_hooke_;
   Real end_ideal_;
   Real end_inverse_hooke_;
+  SCM break_permission_;
   Interval keep_inside_line_;
 };
 
@@ -401,6 +402,7 @@
     }
   if (!line_starter && to_boolean (col->get_property ("keep-inside-line")))
     desc.keep_inside_line_ = col->extent (col, X_AXIS);
+  desc.break_permission_ = col->get_property ("line-break-permission");
   return desc;
 }
 
@@ -409,10 +411,12 @@
 		 Real line_len, Real indent, bool ragged)
 {
   vector<Real> force;
-  force.resize (breaks.size () * breaks.size ());
+  force.resize (breaks.size () * breaks.size (), infinity_f);
 
   vector<Column_desc> cols;
   vsize b = 1;
+  SCM force_break = ly_symbol2scm ("force");
+
   cols.push_back (Column_desc ());
   for (vsize i = 1; i < icols.size () - 1; i++)
     {
@@ -457,6 +461,9 @@
 	    }
 	  spacer.solve ((b == 0) ? line_len - indent : line_len, ragged);
 	  force[b * breaks.size () + c] = spacer.force ();
+
+	  if (cols[end].break_permission_ == force_break)
+	    break;
 	  if (!spacer.fits ())
 	    {
 	      force[b * breaks.size () + c] = infinity_f;
@@ -497,8 +504,15 @@
       spacer.add_spring (cols[i].ideal_, cols[i].inverse_hooke_);
     }
   for (vsize i = 0; i < cols.size (); i++)
-    for (vsize r = 0; r < cols[i].rods_.size (); r++)
-      spacer.add_rod (i, cols[i].rods_[r].r_, cols[i].rods_[r].dist_);
+    {
+      for (vsize r = 0; r < cols[i].rods_.size (); r++)
+	spacer.add_rod (i, cols[i].rods_[r].r_, cols[i].rods_[r].dist_);
+      if (!cols[i].keep_inside_line_.is_empty ())
+	{
+	  spacer.add_rod (i, cols.size (), cols[i].keep_inside_line_[RIGHT]);
+	  spacer.add_rod (0, i, cols[i].keep_inside_line_[LEFT]);
+	}
+    }
 
   spacer.solve (line_len, ragged);
   ret.force_ = spacer.force ();
_______________________________________________
lilypond-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to