lilypond-user
[Top][All Lists]
Advanced

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

Re: Change clef size


From: Jean Abou Samra
Subject: Re: Change clef size
Date: Sun, 30 Oct 2022 23:15:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.1

Le 30/10/2022 à 23:06, Paul Hodges a écrit :
To get the best match with other pieces being supplied to the same publisher I am using the Bravura font instead of Emmentaler.  However, the change-clef glyphs in this font are notably smaller than usual, and I've been asked to enlarge them.  I know how to use the full size clef glyphs, but that's not an acceptable solution, and I cannot find any size property attached to clefs which I could tweak.  Am I missing something simple, or do I have to find a way to change the glyph in the font?




Something like this?

\version "2.22.2"

\layout {
  \context {
    \Score
    \override Clef.font-size =
      #(lambda (grob)
         (let* ((glyph (ly:grob-property grob 'glyph-name))
                (is-change (string-endswith glyph "_change")))
           (if is-change
               0.5 ;; adjust
               0)))
    \override Clef.before-line-breaking =
      #(lambda (grob)
         ;; Necessary to trigger font-size callback.  Otherwise it is
         ;; not triggered because font-size is used via the same property
         ;; alist chain mechanism as markups.
         (ly:grob-property grob 'font-size))
  }
}

{
  \clef "treble"
  c''1
  \clef bass
  c1
}


Best,
Jean




reply via email to

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