[Top][All Lists]

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

markup column with baseline-skip relative to font size

From: Kieren MacMillan
Subject: markup column with baseline-skip relative to font size
Date: Fri, 16 Nov 2018 20:35:58 -0500

Hi all,

In the snippet below, you’ll see that I’m attempting to override Fingering in a 
custom context to add a caret (^) on top of the [formatted] finger number to 
make it into a scale degree.

The "padding" between the caret and the number isn’t relative, as I would like 
it to be: it should always be some fraction of the font height (either x-height 
or m-height or M-height or similar). Is there a way to accomplish this? Bonus 
points if the top of the caret and the baseline of the numbers remain the same 
even when using lowercase numerals.



\version "2.19.80"

\layout {
  \context {
    \name UrlinieVoice
    \inherit-acceptability "UrlinieVoice" "Voice"
    \override Beam.positions = #'(7 . 7)
    \override NoteHead.duration-log = #1
    \override Fingering.padding = #1
    \override Fingering.stencil = #(lambda (grob)
                                     (let ((text (ly:grob-property grob 'text)))
                                       (grob-interpret-markup grob
                                         (markup #:text
                                           #:override '(baseline-skip . 1.75)
                                           #:center-column ("^" text)))))

stuff = \fixed c'' { g8[-5 f-4 e-3 d-2 c-1] }

\new UrlinieVoice \stuff

\new UrlinieVoice \with { \override Fingering.font-size = #4 } \stuff


Kieren MacMillan, composer
‣ website:
‣ email: address@hidden

reply via email to

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