[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lilypond-user
Subject:    Setting global staff size after the \paper block nullifies font setting
From:       Brent Annable <brentannable () gmail ! com>
Date:       2021-07-31 6:05:52
Message-ID: CAJk+zrm8sD_teWwG0yUzUh+MUq-gnCDLPHqRiLs51+RBdxwUwg () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi all,

I've come across a little problem that I don't know how to fix. I've
changed the text font in a vocal score by using the scheme #define font
procedure, and have noticed that if I subsequently use
#(set-global-staff-size) *after* the \paper block, the font reverts back to
the default. It doesn't do this if I use #(set-global-staff-size) *before *the
paper block.

This is a little annoying, because I would like to use a global \paper
block for all the motets in the edition, but still be able to tweak the
staff sizes for each score somewhat to achieve consistent system counts
(which messes up the font setting if I do it before each \score in the
file). I am also using a global \layout block, so I can't put the staff
size setting there either (unless someone can show me a way of defining *some
*layout settings in a global variable file without freaking Lilypond out -
I have tried but not succeeded.)

 A sample file is attached. Just toggle the staff-sizing commands before
and after the \paper block to see how the header font changes.

I would appreciate any help!

Regards,

Brent.

[Attachment #5 (text/html)]

<div dir="ltr">Hi all,<br><div><br></div><div>I&#39;ve come across a little problem \
that I don&#39;t know how to fix. I&#39;ve changed the text font in a vocal score by \
using the scheme #define font procedure, and have noticed that if I subsequently use \
#(set-global-staff-size) <b>after</b>  the \paper block, the font reverts back to the \
default. It doesn&#39;t do this if I use #(set-global-staff-size) <b>before </b>the \
paper block.</div><div><br></div><div>This is a little annoying, because I would like \
to use a global \paper block for all the motets in the edition, but still be able to \
tweak the staff sizes for each score somewhat to achieve consistent system counts \
(which messes up the font setting if I do it before each \score in the file). I am \
also using a global \layout block, so I can&#39;t put the staff size setting there \
either (unless someone can show me a way of defining <i>some </i>layout settings in a \
global variable file without freaking Lilypond out - I have tried but not \
succeeded.)</div><div><br></div><div>  A sample file is attached. Just toggle the \
staff-sizing commands before and after the \paper block to see how the header font \
changes.<br></div><div><br></div><div>I would appreciate any \
help!</div><div><br></div><div>Regards,</div><div><br></div><div>Brent.</div><div><br></div></div>



["Setting-staff-size-after-paper-block-nullifies-font-setting-example.ly" (text/lilypond-source)]

\version "2.22.1"

  %Setting staff size before the paper block, everything is okay
  
  %#(set-global-staff-size 16)
  
\paper {
  #(define fonts
    (set-global-fonts 
     #:roman "Cambria"
     #:factor (/ staff-height pt 20)
   ))
}

%Setting staff size after the paper block, the font setting reverts.

#(set-global-staff-size 16)

\header {
  title = "HEADER" }

\relative c' { c4 c c c 
c4 c c c
c4 c c c
c4 c c c
c4 c c c
c4 c c c
c4 c c c}



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic