)se

2017-04-29 4:49 GMT+02:00 Michiel Sikma <m...@letsdeliver.com>:
>
> Hi there,
>
> There's something I don't entirely understand about \magnifyStaff - I'm using 
> it to scale down my entire score, without having to use layout-set-staff-size 
> (since I don't want to switch to a different feta font size, but just scale 
> the feta20 one slightly.)
>
> However, I discovered that something funny happens when you use \teeny or 
> \normalsize or any of the other commands that set fontSize.
>
> Here's an example:
> http://lilybin.com/nqeqsu/1
>
> Basically, when using \teeny, it sets the note heads to a smaller than normal 
> size, but it doesn't take \magnifyStaff into account. So the notes are scaled 
> according to a base of 100 rather than whatever the staff magnification is. 
> Similarly, setting \normalsize resets the note heads to 100% of an 
> unmagnified staff.
>
> My expectation is that \magnifyStaff magnifies everything. So if \teeny sets 
> the size to, say, 70%, and \magnifyStaff is set to #50/100, I expect the size 
> to be 35%. And if \normalsize sets the size to 100%, in \magnifyStaff #50/100 
> I expect the result to be 50%. Et cetera.
>
> The \normalsize/etc commands permanently change the note head size (and 
> markup size) for a voice, leaving everything else the same. Probably, they 
> are internally setting the fontSize to a static value rather than taking the 
> magnification into account.
>
> Either this is a bug or I'm not using it correctly. But it seems like if you 
> have a magnified staff, one should still be able to use the fontSize commands.
> Would love to hear people's thoughts, I'm going to see if I can find a 
> workaround - probably I can just set the fontSize myself based on my magnify 
> value.
>
> Regards,
> Michiel


Hi Michiel,

all of the predifined commands teeny, tiny, small, normalsize, large,
huge set the fontSize for the Bottom-context where they are applied,
to an absolute Volume, as well does magnifyStaff for the Staff.
They don't add up and they shouldn't, otherwise collecting several
music-variables in one Staff from different sources will be pretty
unpredictable.

See the examples below. First usual \huge is demonstrated, i.e (\set
fontSize = #2)
Then I add up the applied fontSizes using 'my-fontSize'-music-function.
Note how the content of \zz changes depending where called.
Why should this ever be the default?

\version "2.19.56"

\paper { indent = 30 }

%% For convenient checking
% currently not used below
check-fontSize =
  \applyContext
    #(lambda (ctx)
       (format #t
         "\n\tfontSize is:\t~a\n"
         (ly:context-property ctx 'fontSize)))

x = { \huge c'1 }
y = { \huge d'1 }
z = { \huge e'1 }

\new Staff \with { instrumentName = "default \\huge" } { \x \y \z }
\new Staff \with { instrumentName = "default \\huge" } { \x \z \y }

my-fontSize =
#(define-music-function (val)(number?)
  #{
    \applyContext
      #(lambda (ctx)
         (ly:context-set-property! ctx 'fontSize
          (+ val (ly:context-property ctx 'fontSize 0))))
  #})

xx = { \my-fontSize 2 c'1 }
yy = { \my-fontSize 2 d'1 }
zz = { \my-fontSize 2 e'1 }

\new Staff \with { instrumentName = "adding fontSize" } { \xx \yy \zz }
\new Staff \with { instrumentName = "adding fontSize" } { \xx \zz \yy }
\new Staff \with { instrumentName = "adding fontSize" } { \zz \xx \yy }

Cheers,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to