[Top][All Lists]

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

Re: Pure properties

From: Joe Neeman
Subject: Re: Pure properties
Date: Wed, 25 May 2011 11:19:15 +0300

On Wed, May 25, 2011 at 1:05 AM, address@hidden <address@hidden> wrote:
On May 24, 2011, at 11:08 AM, Joe Neeman wrote:

A pure callback is one that has no side-effects. In define-grobs.scm, you will find a list of pure callbacks, along with an associative list that allows you to substitute a non-pure callback for a pure one.

Pure callbacks are important for spacing and page-breaking, particularly pure Y-extent and Y-offset callbacks. For example, a slur cannot know its true Y-extent until after the page breaks, line breaks, and horizontal spacing have been completed. But we need to know its Y-extent while computing the page breaking, so we can see if things fit on a page without collisions; hence ly:slur::pure-height.


Thanks Joe!
So, if I understand you correctly, ly:slur::pure-height provides a side-effectless approximation that is useful for other functions, whereas the real height is what is calculated after all of the line breaking has been done?
Is there ever a case, then, where the approximated pure property differs so greatly from the actual property that the erroneous first-pass approximation leads to bad typsetting?

 Yes. Usually it leads to either an overfull or an underfull page. We had a lot of these bugs after the new page-breaking code was introduced, but I haven't seen any for a while now.


reply via email to

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