Greetings Ponderers,
I am doing some work with some custom slur drawing for grace notes, for various
(way too complicated to explain here) reasons. I need to position these graphic
marks very precisely, and very close to the notehead. I am using Scheme
functions to draw my paths, and producing a markup function to use in the
music. The issue I am having is that for each mark, and I have hundreds, I need
to adjust the TextScript offset to get them positioned for a good appearance,
using
\once \override TextScript.extra-offset = #’(0 . -5)
for example.
What I am asking is how to adjust the TextScript.extra-offset inside
define-markup-command code. I have simplified the code to the bare minimum, so
it is somewhat artificial, but hopefully it is clear what I am attempting. How
can I have complete control over the positioning to the offset of the line in
this example? I can’t get it to cross into the staff lines, even when I
globally set outside-staff-priority to ##f. Translating the stencil in the
Scheme does not seem to be adequate.
\version "2.19.24"
#(define-markup-command (graphic layout props dest offset)
(pair? pair?)
(let* ((stil
(interpret-markup layout props
(markup #:draw-line dest))))
(ly:stencil-translate stil offset)))
treble = \relative c'' {
\clef treble
\time 1/4
c
\grace {
\stemDown
%\override TextScript.outside-staff-priority = ##f
bes8^\markup \graphic #'(2 . 2) #'(0 . -3)
}
bes4 a c
}
\score {
\new Staff { \treble }
\layout { }
}
Andrew
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user