lilypond-user
[Top][All Lists]
Advanced

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

Re: Text centralized above a TextSpan


From: David Nalesnik
Subject: Re: Text centralized above a TextSpan
Date: Mon, 14 Sep 2015 07:22:48 -0500



On Sun, Sep 6, 2015 at 12:17 PM, David Nalesnik <address@hidden> wrote:


Hopefully another step forward!


Attached is an improvement.

2.19.27 has been released, and you need this version to get the full functionality here.  (There is provision for earlier versions--see note far down in the first function--but you'll only get solid lines, unless you're up for some heavy enhancement.)

The alignment of texts at the beginning and end is fixed, so you can left-align, right-align, translate, whatever, with predictable results.

You can spread texts over more than two lines.  Here, the algorithm is pretty simple, and is more of a placeholder.  Unfortunately, text can clump when a spanner starts close to the line end or ends close to the start.  You can tweak the line distribution by adding spacers (""), as explained in one of the examples.  What's needed is an algorithm that looks for overlaps and shifts texts from first line forward, last line back as needed.  I've been pondering this.  Probably it will require creating a new property which specifies text count per line, so there isn't massive redundant calculation. On the TODO list.  At the moment, if I have to write another loop, I will scream :)

Anyway, enjoy!

David

Attachment: text-spanner-centered-text.ly
Description: Text Data


reply via email to

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