lilypond-user
[Top][All Lists]
Advanced

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

Unexpected behaviour of script-stencil-hack


From: Thomas Morley
Subject: Unexpected behaviour of script-stencil-hack
Date: Wed, 15 Oct 2014 00:38:58 +0200

Hi folks,

consider the following code.



\version "2.19.13"
%\version "2.16.0"

add-to-script =
#(define-event-function (parser location mrkp music)(markup? ly:music?)
  #{
    \tweak #'stencil
      #(lambda (grob)
         (let (
               ;(X-offset (ly:grob-property grob 'X-offset))
               )
           (ly:stencil-combine-at-edge
             (ly:script-interface::print grob)
             X
             RIGHT
             (grob-interpret-markup grob (markup #:normal-text mrkp))
             0)))
    $music
  #})

{ c''1 \add-to-script \markup "xxxxxxxxxxxxx" \trill }



Hacking Script 'stencil I add markup to the default-stencil. Works as expected.

Though, regard the local binding for X-offset.
With 2.19.13:
Commenting it will center the whole new Script-stencil above the parent.
Uncomment it and you see the default Script-glyph in unchanged
position and the additions right to it.

That's unexpected, at least for me and doesn't happen with 2.16 (don't
have 2.18 on this machine)

Why does this happen? X-offset is _never_ called in the body!
Shouldn't be the new stencil always be centered, because self-alignment-X is 0?
I would expect a different alignment only, if I change the values for
X-offset and/or self-alignment-X myself.


Cheers,
  Harm



reply via email to

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