[Top][All Lists]

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

Re: different sizes for instrument names (Staff vs. PianoStaff)

From: Mats Bengtsson
Subject: Re: different sizes for instrument names (Staff vs. PianoStaff)
Date: Wed, 30 Sep 2009 13:45:45 +0200
User-agent: Thunderbird (X11/20070716)

The simple explanation is that the fontSize property is handled by the Font_size_engraver, which by default lives in the Staff context. Since the PianoStaff instrument names are typeset at the PianoStaff level, it means that the value of fontSize isn't used, then.
One solution is to add the engraver also at the PianoStaff level:
   \consists "Font_size_engraver"

As far as I can see, this does not influence how the fontSize property is handled at the Staff level, so there should be no negative side-effects.

An alternative, is to explicitly set the font size for the instrument names:
\new PianoStaff \with { \override InstrumentName #'font-size = #(magnification->font-size 2/3) ... }


Marc Hohl wrote:

while working with lilypond I discovered that changes of the font size are
treated differently between Staff and PianoStaff.

Consider the following snippet:

\version "2.13.4"

stuff = \relative c {
 c4 d e f
 g a b c

\score {
\new Staff = "Staff" \with { \override StaffSymbol #'staff-space = #2/3 fontSize = #(magnification->font-size 2/3)
                                instrumentName = #"Staff" }
   { \clef "treble"  \stuff }
\new PianoStaff = "PianoStaff" \with { \override StaffSymbol #'staff-space = #2/3 fontSize = #(magnification->font-size 2/3) instrumentName = #"PianoStaff" }
     \new Voice = "RH" { \clef "treble" \stuff }
     \new Voice = "LH" { \clef "bass" \stuff }

The "Staff" is scaled properly, whereas "PianoStaff" is not. I didn't find anything in the bug tracker,
but this seemed to be not the desired behavior.


lilypond-devel mailing list

        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden

reply via email to

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