lilypond-devel
[Top][All Lists]
Advanced

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

Re: centering of instrument names


From: Joe Neeman
Subject: Re: centering of instrument names
Date: Sat, 23 May 2009 12:02:19 -0700

On Fri, 2009-05-22 at 23:46 +0100, Neil Puttock wrote:
> 2009/5/20 Francisco Vila <address@hidden>:
> > 2009/5/20 Francisco Vila <address@hidden>:
> >> The key code is this. Given a (big) amount of time I could figure out
> >> how it works and try to improve it.
> >>
> >> http://git.savannah.gnu.org/gitweb/?p=lilypond.git;a=blobdiff;f=lily/system-start-text.cc;h=c99f150fed;hp=494ab1;hb=b12cf254;hpb=4d0abb92
> >
> > Maybe it's not that easy. If the right padding is intended to put the
> > stencil to the rightmost side, the problem is that the extent of the
> > brace (if any) is unknown at this moment.
> 
> The InstrumentName has to be attached to the left edge of the
> VerticalAxisGroup (i.e., the Staff), so the only way to position it is
> to apply padding on its right hand side; this moves it away from the
> system.  In order to prevent collisions between instrument names and
> PianoStaff braces, the system start delimiters are added as
> side-support-elements of each InstrumentName, thus leading to a
> variation in support extents depending on where each InstrumentName is
> attached to the system.
> 
> I think the simplest way to deal with this is to split it into two parts:
> 
> 1. Remove the side-support-elements so every InstrumentName has the
> same alignment anchor in the X-axis (i.e., the left edge of each
> stave).
> 
> This is a simple matter of removing the acknowledger for
> system-start-text in the System_start_delimiter_engraver.
> 
> 2. Calculate the combined extents of all the system start delimiters
> in a system, then apply an X-offset correction to each InstrumentName.
>  This ensures that there wil be no collisions between any
> InstrumentName and SystemStartBrace/Bracket/Bar/Square.

If I understand this correctly, you're suggesting that we pad each
instrument name according to the largest (wrt X-extent) SystemStartXXX.
Would this allow the attached layout (stolen from Valentin's bug
report), where the "Timpani in D, A" line is nicely centred, but it
slightly overlaps with the brace below it?

Joe

Attachment: haydn.jpg
Description: JPEG image


reply via email to

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