X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fspacing-spanner.cc;h=99fe9824a8e1c7ca083666030a1c7dc8c7630ab7;hb=b8c66cadfa52c1c5b32ba35166d9b2099f627726;hp=ba5d40e51879ffe7f5b7709c51cbfed96579ed41;hpb=e1fd3df922e1382ca1a3be25204e28468d8dace1;p=lilypond.git diff --git a/lily/spacing-spanner.cc b/lily/spacing-spanner.cc index ba5d40e518..99fe9824a8 100644 --- a/lily/spacing-spanner.cc +++ b/lily/spacing-spanner.cc @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1999--2007 Han-Wen Nienhuys + (c) 1999--2009 Han-Wen Nienhuys */ #include "spacing-spanner.hh" @@ -303,7 +303,8 @@ Spacing_spanner::generate_springs (Grob *me, prev = col; } - set_column_rods (cols, 0.1); // FIXME: padding + Real padding = robust_scm2double (prev->get_property ("padding"), 0.1); + set_column_rods (cols, padding); } /* @@ -405,8 +406,20 @@ Spacing_spanner::musical_column_spacing (Grob *me, Note that we don't actually pack things as tightly as possible: we don't allow the next column to begin before this one ends. */ - spring.set_distance (max (left_col->extent (left_col, X_AXIS)[RIGHT], - spring.min_distance ())); + /* FIXME: the else clause below is the "right" thing to do, + but we can't do it because of all the empty columns that the + ligature-engravers leave lying around. In that case, the extent of + the column is incorrect because it includes note-heads that aren't + there. We get around this by only including the column extent if + the left-hand column is "genuine". This is a dirty hack and it + should be fixed in the ligature-engravers. --jneem + */ + if (Paper_column::is_extraneous_column_from_ligature (left_col)) + spring.set_distance (spring.min_distance ()); + else + spring.set_distance (max (left_col->extent (left_col, X_AXIS)[RIGHT], + spring.min_distance ())); + spring.set_inverse_stretch_strength (1.0); } @@ -501,7 +514,8 @@ Spacing_spanner::breakable_column_spacing (Grob *me, Item *l, Item *r, && l->break_status_dir () == CENTER && fills_measure (me, l, r)) { - spring.set_distance (spring.distance () + 1.0); + Real full_measure_extra_space = robust_scm2double (l->get_property ("full-measure-extra-space"), 1.0); + spring.set_distance (spring.distance () + full_measure_extra_space); spring.set_default_strength (); }