[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Strange behavour of layout-set-staff-size
From: |
Thomas Morley |
Subject: |
Re: Strange behavour of layout-set-staff-size |
Date: |
Mon, 24 May 2021 13:00:05 +0200 |
Am Mo., 24. Mai 2021 um 12:17 Uhr schrieb David Kastrup <dak@gnu.org>:
>
> Thomas Morley <thomasmorley65@gmail.com> writes:
>
> > Hi,
> >
> > while experimenting with test codes for issue
> > https://gitlab.com/lilypond/lilypond/-/issues/5977 I stumbled across:
> >
> > \score {
> > { \tempo 8 = 88 c'8^"toplevel Score" }
> > \layout { #(layout-set-staff-size 40) }
> > }
> >
> > \book {
> > \paper { #(layout-set-staff-size 40) }
> > { \tempo 8 = 88 c'8^"explicit book" }
> > }
> >
> > Both in one file.
> > The text in the toplevel score is cramped. Output attached.
> > No idea what happens... Though, it's similar even for ancient 2.12.3
> > and all upstream versions.
>
> I don't think layout-set-staff-size ever worked in a manner people
> expected it to. It retains some globally set sizes and changes some
> other ones. People are usually advised to use global-set-staff-size :
> maybe layout-set-staff-size only makes sense in a score markup? There
> you would not want to use global-set-staff-size I think?
>
> --
> David Kastrup
Well, I didn't check for score-markup.
Though the examples in #5977 use layout-set-staff-size and others.
I was surprised that layout-set-staff-size may change the staff-space or _not_
#(define-markup-command (tst layout props arg)(markup?)
(format #t "\n\tcurrent-staff-space: ~a"
(ly:output-def-lookup layout 'staff-space))
(interpret-markup layout props arg))
\score {
{ b1-\markup \tst "foo" }
\layout { #(layout-set-staff-size 40) }
}
\book {
\paper { #(layout-set-staff-size 40) }
{ b1-\markup \tst "foo" }
}
->
book:
current-staff-space: 1.0
score:
current-staff-space: 2.0
This is inconsistent, imho.
At least we should document it more verbose: Obviously the
book-example is bad coding... _If_ layout-set-staff-size is wished it
should go in score-layout as well.
Cheers,
Harm