lilypond-devel
[Top][All Lists]
Advanced

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

Re: Set indent based on instrument name (issue 6457049)


From: k-ohara5a5a
Subject: Re: Set indent based on instrument name (issue 6457049)
Date: Sat, 04 Aug 2012 07:28:29 +0000

On 2012/08/01 06:45:22, MikeSol wrote:

Avoid measuring extents when engraving is happening because they could
be
dependent on other callbacks which could trigger many layout decisions
before
engraving is finished.


This is a case where measuring extents early seems appropriate.

Phil wants the line-indents, thus line-lengths, thus some very early
layout decisions, to depend on the extents of the instrument names.

The dependency is reversed in this case from the more usual situations
where Mike's suggestion holds, such as the extent of a hairpin, which
depends on the layout.

Here, what I would do is use the Pointer_group_interface to add two
grob arrays

Running through those arrays and re-checking the lengths of the
instrument names every time we look up the line-indent, would let the
line-breaker see if those lengths changed for some reason depending on
the evolving layout.  I do not expect the line-breaker to behave
sensibly if the indents change like this.

Properties, in LilyPond, are the best way to stash
information.

Phil, working with properties, or in this case Scheme variables
associated with layout, does seems necessary.  See set_variable().
Old scores where we chose \paper {indent = 2.3\cm } to fit the
instrument names should continue to work.
If you can figure out enough Scheme to have LilyPond initialize indent
so that it evaluates a different Scheme variable (say, default-indent)
and have the engraver updates that variable, then we can have
automatically-adapting intends by default, and let users override by
replacing the link to default-indent with their own choice.

http://codereview.appspot.com/6457049/



reply via email to

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