lilypond-user
[Top][All Lists]
Advanced

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

Re: font size for instrument names in a PianoStaff


From: Marc Hohl
Subject: Re: font size for instrument names in a PianoStaff
Date: Wed, 25 Sep 2013 11:54:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0

Am 25.09.2013 11:03, schrieb David Kastrup:
Marc Hohl <address@hidden> writes:

Hello list,

I tried to enhance the definition found in

http://lists.gnu.org/archive/html/lilypond-user/2013-09/msg00416.html

which works pretty well for staves, but not for PianoStaff contexts.
The size of the second PianoStaff.instrumentName is unchanged, but it
should be much smaller.

Can anybody explain to me what's wrong with my definition?

Thanks in advance,

Marc

\version "2.17.25"

staffSize = #(define-music-function (parser location new-size) (number?)
#{
   \set Staff.fontSize = #new-size
   \set PianoStaff.fontSize = #new-size
   \override Staff.StaffSymbol #'staff-space = #(magstep new-size)
   \override Staff.StaffSymbol #'thickness = #(magstep new-size)
#})

[...]

      \new PianoStaff \with
        { instrumentName = "size -5"
          \staffSize #-5 }

Well, looking at ly/engraver-init.ly, you are likely missing out on

     \consists "Font_size_engraver"

in your context modification.

Ah, thanks a lot!

Alternatively, you can do its job by hand
and set

\override InstrumentName.font-size = #-5

This would work *without* the \set Staff.fontSize declaration, otherwise they seem to be applied consecutively ...

Since the PianoStaff is basically a StaffGroup, it does not have much
use for a Font_size_engraver.  The context setting fontSize is more
intended for the stuff above and below staves.

I see. So the font size modification of a normal Staff via
\set Staff.fontSize is a side effect?

Thanks a lot,

Marc






reply via email to

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