lilypond-devel
[Top][All Lists]
Advanced

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

Re: centering of instrument names


From: Francisco Vila
Subject: Re: centering of instrument names
Date: Wed, 20 May 2009 02:39:03 +0200

2009/5/20 Patrick McCarty <address@hidden>:
> On Tue, May 19, 2009 at 10:09 AM, Francisco Vila <address@hidden> wrote:
>> Hello,
>>
>> I think instrument names were recently implemented in a centered
>> column by default. I would like to help improving this because the
>> exact location of every name is at first well computed but finally
>> wrongly typeset, as the braces are not taken into account. Currently,
>> names of staves or groups without a brace are typeset too much at the
>> right, losing the centered aspect initially intended.
>
> Could you send some examples that illustrate the problem(s)?

Well, I'm surprised, I believed it was a very well-known issue.
Compare, for example, the violas in these examples.

haydn - scanned
http://img34.imageshack.us/img34/3797/haydn.jpg

haydn - lilypond
http://img36.imageshack.us/img36/6978/haydnlilypond.png

holst - scanned
http://img521.imageshack.us/img521/5015/holst.jpg

holst - lilypond
http://img521.imageshack.us/img521/763/holstlilypond.png


> The values for many of the paper variables are hardcoded in
> ly/paper-defaults-init.ly.  Other variables (line-width, indent,
> short-indent) are calculated in terms of the paper size in
> scm/paper.scm.

Yes, the centered position of a name is computed from the indent value
and a right-padding for it from there. I think it should be a left
padding instead, to avoid this problem. The right padding is fine if
you want the names to be right-aligned minus a padding, but this
method is not suitable to achieve centered names.

> It sounds like you want to see indent and short-indent automatically
> adjust so that instrument names are always centered.  Is this correct?

Of course if they are supposed to be centered by default, I'd like
them to be always well centered. I can live with a manually set indent
value that is big enough, but even in this case the opening braces
destroy the centered column of names.

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



-- 
Francisco Vila. Badajoz (Spain)
www.paconet.org




reply via email to

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