lilypond-devel
[Top][All Lists]
Advanced

[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 2.0.0.5 (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:
\layout{
 \context{
   \PianoStaff
   \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) ... }

  /Mats

Marc Hohl wrote:
Hello,

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.

Marc



_______________________________________________
lilypond-devel mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-devel

--
=============================================
        Mats Bengtsson
        Signal Processing
        School of Electrical Engineering
        Royal Institute of Technology (KTH)
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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