if (page_count > 1)
min_sys_count -= best.systems_per_page_[page_count - 2];
- message (_f ("Fitting music on %d (or one fewer) pages...", (int)page_count));
+ if (page_count == 1)
+ message (_ ("Fitting music on 1 page..."));
+ else
+ message (_f ("Fitting music on %d or %d pages...", (int)page_count-1, (int)page_count));
+
/* try a smaller number of systems than the ideal number for line breaking */
bound = ideal_line_division;
for (vsize sys_count = ideal_sys_count; --sys_count >= min_sys_count;)
else
{
cache_line_details (configuration);
+
+ vsize min_p_count = min_page_count (configuration, first_page_num);
Page_spacer ps (cached_line_details_, first_page_num, this);
- n_res = ps.solve (n);
- m_res = ps.solve (n+1);
+ if (n >= min_p_count)
+ n_res = ps.solve (n);
+ if (n < cached_line_details_.size ())
+ m_res = ps.solve (n+1);
}
Real penalty = blank_page_penalty ();
All the systems that don't fit get tacked onto the last page.
*/
vsize i;
- for (i = system; isinf (state_.at (i, page_count-1).demerits_) && i--; )
+ for (i = system; isinf (state_.at (i, page_count-1).demerits_) && i; i--)
;
if (i)
(axes . (,Y))
(Y-extent . ,ly:axis-group-interface::height)
(vertical-skylines . ,ly:axis-group-interface::calc-skylines)
+ (adjacent-pure-heights . ,ly:axis-group-interface::adjacent-pure-heights)
(meta . ((class . Spanner)
(interfaces . (axis-group-interface
))))))