lilypond-user
[Top][All Lists]
Advanced

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

Odp: Custom TimeSignature doesn't scale correctly


From: Karol Majewski
Subject: Odp: Custom TimeSignature doesn't scale correctly
Date: Thu, 16 Jul 2015 21:52:43 +0200

OK, so with abs-fontsize it scales properly, but if I set global staff size 
_higher_ than default (20) then it doesn't scale.



%%%%% BEGIN %%%%%%

#(define
  (customTimeSignature grob)
  (let*
    ((sz
        (ly:grob-property grob 'font-size 0.0))
        (mult (magstep sz))
    (fraction
        (ly:grob-property grob 'fraction))
      (num
        (car fraction))
      (denom
        (cdr fraction)))
    (grob-interpret-markup grob #{
      \markup {
         \scale #(cons mult mult) \override #'(font-name . "Times") 
\abs-fontsize #15 \override #'(baseline-skip . 2) \center-column {
          \line {
            #(number->string num)
          }
          \line {
            #(number->string denom)
          }
        }
      }
    #})))

\layout {
  \context {
    \Score
    \override TimeSignature.stencil = #customTimeSignature
  }
}

one = {
  \time 3/4 c'2.
}

two = {
  c'2.
}

<<
  \new Staff \with {
    fontSize = #-3
    \override StaffSymbol.staff-space = #(magstep -3)
  } \one
  \new Staff \two
>>


%%%%% END %%%%%%





reply via email to

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