[Top][All Lists]

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

Re: strut problem

From: Jean Abou Samra
Subject: Re: strut problem
Date: Fri, 18 Nov 2022 12:16:09 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.1

Le 18/11/2022 à 12:05, Werner LEMBERG a écrit :
The latter.  What I suggest is that zero-width/zero-height objects
*are* taken in account for computing the skylines.

What makes your (redefined) \strut not taken into account into
skylines is not just its empty X extent. You can see that it is still
not taken into account if you replace empty-interval with '(0 . 10).
That is caused by the "" stencil expression, which LilyPond never
gives skylines to -- unless it's the whole stencil: you can see
that in this example:

\version "2.23.81"

#(define-markup-command (strut layout props)
    #:properties ((baseline-skip))
    (ly:make-stencil ""
                     '(0 . 10)
                     (cons (* -0.3 baseline-skip)
                           (* 0.7 baseline-skip))))

   \override = ##t
   \override = ##t
   e'4^\markup { "a" }
   % \strut not taken into account for vertical skylines
   e'4^\markup { \strut "a" }
   % Here, \strut *is* taken into account.
   e'4^\markup \strut

It is completely unclear to me how you would take non-printing
stencils with empty extents into skylines. How should the resulting
skylines look like? If the X extent is empty-interval, why should
the vertical skyline take this stencil into account on '(0 . 0)
and not on, say, '(2 . 2)?

If you want something in the skylines, you need to tell
LilyPond how its skylines should look like, with the extents.

If \strut needs to have an empty X extent for horizontal
spacing reasons, you will need to use ly:stencil-outline.

Regarding the latter, the handling looks inconsistent. I've opened about that.
Thanks.  However, I can't immediately that these two problems are
related :-)

The same happens with embedded-ps as with "" above.


Attachment: OpenPGP_signature
Description: OpenPGP digital signature

reply via email to

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