lilypond-user
[Top][All Lists]
Advanced

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

Re: Empty markup lines behavior change (maybe regression) in dev (2.21.7


From: K.L.
Subject: Re: Empty markup lines behavior change (maybe regression) in dev (2.21.7) than stable (2.20.0)
Date: Fri, 9 Oct 2020 08:49:34 +0800

OK I see, the solution is to place a space char in the empty string.

On Fri, Oct 9, 2020 at 12:30 AM Aaron Hill <lilypond@hillvisions.com> wrote:
On 2020-10-08 3:03 am, K.L. wrote:
> Yes, if a global \markup, it can be reserved, but not for the \markup
> in *\header
> title*.

My testing shows no change in behavior regardless of where the \markup
occurs: at the top-level, in \header, or attached to a note.

Here is a more complete test:

%%%%
\version "2.18.2"
#(format #t "\nversion=~s" (ly:version))
#(define (stencil-empty? sten)
   (let ((xex (ly:stencil-extent sten X))
         (yex (ly:stencil-extent sten Y)))
     (and (> (car xex) (cdr xex))
          (> (car yex) (cdr yex)))))
#(define-markup-command
   (assert layout props id pred? arg)
   (string? procedure? markup?)
   (let ((sten (interpret-markup layout props arg)))
     (or (pred? sten)
         (ly:warning "assertion failed: expected ~a ~a"
           id (procedure-name pred?)))
     sten))
buildTestMarkup =
#(define-scheme-function (parser location scope) (string?)
   #{
     \markup {
       \assert #(string-append scope " \\column {...}")
               #stencil-empty?
       \column {
         \assert #(string-append scope " \\line { \"\" }")
                 #stencil-empty?
         \line { "" }
         \line { "" }
       }
     }
   #})
\header { title = \buildTestMarkup "\\header" }
\buildTestMarkup "top-level"
{ b'4 -\buildTestMarkup "TextScript" }
%%%%


> I checked this in a svg backend result.

That is the critical piece of information.  The behavior only reproduces
using the SVG backend.

This is a bug in 2.20.0 and earlier, where \line { "" } does not resolve
to an empty-stencil but rather a point-stencil, so it ends up taking up
space when it should not.

This appears to have been resolved in 2.21.x.


-- Aaron Hill

reply via email to

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