Lukas, your \alignToBaseLine command is working beautifully in my music so
far! Thank you very much.

Perhaps this should be the default behavior of markups: that their stencil
extent does not take descenders into account.

Are there many cases where LilyPond’s current behavior
<https://lists.gnu.org/archive/html/lilypond-user/2026-01/msg00189.html>
*is* desirable, though?

---------- Forwarded message ---------
From: Lukas-Fabian Moser
Date: Tue, 20 Jan 2026
Subject: Re: \general-align Does Not Understand Descenders/Ascenders in
Text within \markup Block

Well, one could tweak the stencil extent of a markup such that it does not
take the descenders into account. The following is a very very crude
proof-of-concept (what about ascenders? what about multi-line markup? what
about automation? etc.), but just to show what I mean:
#(define-markup-command (alignToBaseLine layout props content) (markup?)
   (let ((stil (interpret-markup layout props content))
         (no-descender (interpret-markup layout props "i")))
     (ly:make-stencil
      (ly:stencil-expr stil)
      (ly:stencil-extent stil X)
      (cons (car (ly:stencil-extent no-descender Y))
            (cdr (ly:stencil-extent stil Y))))))

Reply via email to