bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lyrics break estimation of vertical spacing


From: Joe Neeman
Subject: Re: Lyrics break estimation of vertical spacing
Date: Mon, 29 Mar 2010 08:48:35 -0700

On Wed, 2010-03-24 at 19:42 -0400, Boris Shingarov wrote:
> On Wed, 24 Mar 2010 18:15:45 -0400, Boris Shingarov  wrote:
> > Hmm, let me understand this better. 
>   > Does it mean that Constrained_breaking::fill_line_details() gets
>   > called before the line breaks are calculated, and then again after
>  
> Oh, now I understand why!!!  The hack addresses the space
> between staves within a system. 
> Bien sûr it's not doing anything to the space between systems
> (mine are one-staffers, so it *does* cause the estimation to be
> off *a lot*). 
> The TODO at constrained-breaking.cc:479 clearly explains it. 

Keep in mind that a lyric line is the same as a staff to the
page-breaker. Don't your one-staffers have lyrics? If so, they are
really two-staffers and so the problem could still be in the
within-system estimation.

> I am now thinking about how to implement this TODO best. 
> One idea that immediately comes to mind, is to replace the
> unified heights with begin- and rest-of-line pairs, dragging them
> through all the calls, and unite them at the very end, that is in
> constrained-breaking.  For one-staff systems, this should be
> trivial, but I am not sure how difficult it will be to not break the
> general case of multi-staff systems.

You would need to separate Line_details.extent_ into
Line_details.begin_of_line_extent_ and
Line_details.rest_of_line_extent_. I'd suggest writing a
System::begin_of_line_extent and System::rest_of_line_extent, which
finds the VerticalAlignment, calculates the pure-offsets for the staves
and then unifies the appropriate xxx_of_line_extents, with each one at
the appropriate offset.

Cheers,
Joe






reply via email to

[Prev in Thread] Current Thread [Next in Thread]