X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-layout-problem.cc;h=52720d54490738c1579e09d218b0a6cf688f786b;hb=5e3dc2111d63342ec00ecae8f3a1e38961349a1f;hp=95635140bf1d223b0e68a659310654d91c08e7ee;hpb=94345c6367d9e6a7dac6711cbb81845e8e889db5;p=lilypond.git diff --git a/lily/page-layout-problem.cc b/lily/page-layout-problem.cc index 95635140bf..52720d5449 100644 --- a/lily/page-layout-problem.cc +++ b/lily/page-layout-problem.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2009--2012 Joe Neeman + Copyright (C) 2009--2014 Joe Neeman LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -652,8 +652,6 @@ Page_layout_problem::append_system (System *sys, Spring const &spring, Real inde : 0; // Corner case: there was only one staff, and it wasn't spaceable. - // Mark it spaceable, because we do not allow non-spaceable staves - // to be at the top or bottom of a system. if (!found_spaceable_staff && elts.size ()) mark_as_spaceable (elts[0]); } @@ -667,7 +665,8 @@ Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding if (sky) { - minimum_distance = (*sky)[UP].distance (bottom_skyline_); + minimum_distance = max ((*sky)[UP].distance (bottom_skyline_), + bottom_loose_baseline_); bottom_skyline_ = (*sky)[DOWN]; } else if (Stencil *sten = unsmob_stencil (prob->get_property ("stencil"))) @@ -678,6 +677,7 @@ Page_layout_problem::append_prob (Prob *prob, Spring const &spring, Real padding bottom_skyline_.clear (); bottom_skyline_.set_minimum_height (iv[DOWN]); } + bottom_loose_baseline_ = 0.0; Spring spring_copy = spring; if (tight_spacing) @@ -728,12 +728,12 @@ Page_layout_problem::solve_rod_spring_problem (bool ragged, Real fixed_force) Real overflow = spacer.configuration_length (spacer.force ()) - page_height_; if (ragged && overflow < 1e-6) - warning (_ ("cannot fit music on page: ragged-spacing was requested, but page was compressed")); + warning (_ ("ragged-bottom was specified, but page must be compressed")); else { - warning (_f ("cannot fit music on page: overflow is %f", + warning (_f ("compressing over-full page by %.1f staff-spaces", overflow)); - warning (_ ("compressing music to fit")); + force_ = -infinity_f; vsize space_count = solution_.size (); Real spacing_increment = overflow / (space_count - 2); for (vsize i = 2; i < space_count; i++)