lilypond-devel
[Top][All Lists]
Advanced

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

Re: multiple TextSpanners per voice


From: David Nalesnik
Subject: Re: multiple TextSpanners per voice
Date: Sat, 3 Oct 2015 12:02:50 -0500

On Fri, Oct 2, 2015 at 5:59 PM, David Nalesnik <address@hidden>
wrote:

>
>
> On Fri, Oct 2, 2015 at 5:49 PM, David Nalesnik <address@hidden>
> wrote:
>
>>
>> Horizontal_bracket_engraver achieves correct ordering of nested brackets
>> through the side-position-interface array 'side-position-elements.
>> Brackets closer to the staff are added to the support of brackets further
>> away.  However, this only works because 'outside-staff-priority is set to
>> #f by default.  As soon as you set it to a numerical value, chaos ensues:
>> the initial ordering is flipped AND the brackets flip orientation across
>> line breaks.  (See attached images.)
>>
>>
> So much for my analytical skills.  The blue bracket simply changes
> orientation across the line break with outside-staff-priority set to a
> number.
>
>
The problems with HorizontalBracket and TextSpanner may be "fixed" by
setting 'padding to a value ever-so-slightly higher than the value of
'outside-staff-padding. Both grobs are assigned an outside-staff-padding of
0.46 in lily/axis-group-interface.cc.  So, if we set padding to
0.460000001, the ordering comes out OK when staff-priority is set.  (My
conjecture is that by setting 'padding higher than 'outside-staff-padding
we are signalling a collision, which is resolved by
avoid_outside_staff_collisions in axis-group-interface.cc.)

So here is a revised version of the TextSpanner code.  The intention is to
allow as many spanners per voice as you'd like.  This works with
'outside-staff-priority (set to 350 for TextSpanner, by default), but for
the time being, you need to add the 'padding override to handle line
breaks.  (Alternately, you could specify different staff-priorities for
individual spanners, as was done earlier in this thread.)

I hope this is useful.  Suggestions for improvement welcome!

DN

Attachment: scheme-text-spanner-id.ly
Description: Text Data


reply via email to

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