lilypond-user
[Top][All Lists]
Advanced

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

Re: markup column with baseline-skip relative to font size


From: Aaron Hill
Subject: Re: markup column with baseline-skip relative to font size
Date: Sat, 17 Nov 2018 09:16:30 -0800
User-agent: Roundcube Webmail/1.3.6

On 2018-11-17 9:05 am, Kieren MacMillan wrote:
Hi Aaron,

Ah, but the 7 and 5 in that font in fact have descenders. The baseline is not the same as the bottom extent of a glyph.

Yes — we’re saying the same thing.  =)

Oh, I'm a dumb dumb.

Your issue is that the padding between staff and markup is using the bottom extent, not the baseline, hence it looks off.

You might just want to clip the descenders on offending lines. Not recommended for general use, but try:

%%%%
\version "2.19.82"

#(define-markup-command (trim-descenders layout props args) (markup?)
  (let* ((stencil (interpret-markup layout props args))
         (x-extent (ly:stencil-extent stencil 0))
         (y-extent (ly:stencil-extent stencil 1)))
    (interpret-markup layout props (markup
      #:with-dimensions x-extent (cons 0 (cdr y-extent)) args))))

\fixed c'' {
  \override Fingering.font-name = #"Alegreya"
  \override Fingering.font-size = #4
  g8-\finger "q"
  g8-\finger "x"
  g8-\finger "b"
  g8-\finger \markup \trim-descenders "q"
}
%%%%

Side effect is, of course, overlapping. But the padding should now be relative to the baseline (Y-coord zero) regardless of descenders.

-- Aaron Hill

Attachment: trim-descenders.cropped.png
Description: PNG image


reply via email to

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