Peter,

On Wed, Jun 21, 2017 at 5:14 PM, Peter Crighton [via Lilypond] <
ml+s1069038n203959...@n5.nabble.com> 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: 
http://lilypond.1069038.n5.nabble.com/Different-staff-sizes-and-resetting-fonts-tp203959p203980.html
Sent from the User mailing list archive at Nabble.com.
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to