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.
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?