lilypond-user
[Top][All Lists]
Advanced

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

Re: Different staff sizes and resetting fonts


From: tisimst
Subject: Re: Different staff sizes and resetting fonts
Date: Thu, 22 Jun 2017 17:10:56 -0700 (MST)

Peter,

On Wed, Jun 21, 2017 at 5:14 PM, Peter Crighton [via Lilypond] <[hidden email]> wrote:
I need some bookparts to use a different staff size than the rest of a book, thus the usage of layout-set-staff-size. This resets the afore defined fonts and I cannot seem to find a place where to re-define the fonts. See the reduced example below. Any ideas?


\version "2.19.59"

#(set-global-staff-size 15)

\paper {
  #(define fonts
     (set-global-fonts
      #:roman "monospace"
      #:factor (/ staff-height pt 20)
      ))
}

% some bookparts cut …

\bookpart {
  \score {
    b'1^\markup "Serif"

    \layout {
      #(layout-set-staff-size 17)
    }
  }
}

My experience tells me that although the staff-size is larger in the second \bookpart, the horizontal treatment isn't going to be a normal 17pt. It will still be more like the 15pt global one. The only way I've found to get true horizontal spacing correction is with completely different \book blocks, which you can use a separate #(set-global-staff-size... before each one, like this:

#(set-global-staff-size 15)
\book {
  \paper {
    #(set-global-fonts ...)
  }
  { ... bookpart here ... }
}

#(set-global-staff-size 17)
\book {
  \paper {
    #(set-global-fonts ...)
  }
  { ... another bookpart here ... }
}

Unfortunately, this results in separate output PDFs, which I don't think you want. Now, something I've never fully understood is why each of the staff-size-setter functions resets the fonts. That's part of the problem you're seeing. That's also why you'll notice I included a \paper { #(set-global-fonts ... ) } block in each \book. Personally, I would love to have this functionality changed.

The only solution I'm aware of that should be able to get you along your way without changing fonts is to use the \magnifyStaff command, which you can see its usage in the NR section about Ossia staves:

http://lilypond.org/doc/v2.19/Documentation/notation/modifying-single-staves#ossia-staves

Be aware, though, that it still doesn't correct the horizontal spacing to be for a true global 17pt staff size, but it might be sufficient for your needs.

HTH,
Abraham


View this message in context: Re: Different staff sizes and resetting fonts
Sent from the User mailing list archive at Nabble.com.

reply via email to

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