Thanks, David.
I've looked into this, but have no idea what's going on there. Here's crippled version of extraWhiteout function - works only for TextScript and allows to set X-extent only. But still don't know how to turn this into \tweak.
extraWhiteout =
#(define-music-function
(parser location adds)
(pair?)
(define more-stencil-whiteout
(lambda
(grob)
(let*
((function
(assoc-get 'stencil
(reverse
(ly:grob-basic-properties grob))))
(stil
(if
(and
(procedure? function)
(not
(eq?
(procedure-name function) 'more-stencil-whiteout)))
(function grob)
(begin
(ly:warning "" grob) #f))))
(if stil
(let*
((x-ext
(ly:stencil-extent stil X))
(add-to-x-ext
(if
(pair?
(car adds))
(car adds) adds))
(new-stil
(ly:make-stencil
(ly:stencil-expr stil)
(offset-add x-ext add-to-x-ext)
(ly:stencil-extent stil Y)))) new-stil) #f))))
#{
\once \override TextScript.layer =
#10
\once \override TextScript.whiteout = ##t
\once \override TextScript.stencil = #more-stencil-whiteout
#})
%%%%%%%%%%%%%%%%%%%%%%%
musicI = { \time 2/4 \repeat unfold 16 b8 }
musicII = {
r2
\extraWhiteout #'(-2 . 0.5) b4 ^"XXXXXX"
b
r
r^\pppp
\extraWhiteout #'(-2 . 10.5) b4 ^"XXXXXX" b
}
\new StaffGroup
<<
\new Staff \relative c'' \musicI
\new Staff \relative c'' \musicII
>>
--Karol
_______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user