Here’s a proof of concept that I don’t currently have time to develop.  I think 
it would be nice if ly::lyric-extender::print worked this way by default, so 
that a user only had to set LyricExtender.text to get this behavior.
Regards,
— 
Dan

\version "2.19.54"

%% Print a lyric extender with text at the beginning where the
%% extender is broken.  This can be useful after a break (see Behind
%% Bars, p.452).
#(define (dfe-lyric-extender-print grob)
  (let ((line (ly:lyric-extender::print grob)))
   (if (ly:grob-property grob 'text)
    (let* ((x-ext (ly:stencil-extent line X))
           (text (stencil-whiteout-box (lyric-text::print grob))))
     (ly:stencil-add
      line
      (ly:stencil-translate text (cons (interval-start x-ext) 0))))
    line)))

\layout {
  \context {
    \Lyrics
    \override LyricExtender.stencil = #dfe-lyric-extender-print
  }
}

ooo = \lyricmode {
  \once \alterBroken text #'(#f "(oo)") LyricExtender
  Ooo __
}

<<
  \new Voice = "mel" \fixed c' { c1 d e f | \break g a b g }
  \new Lyrics \lyricsto "mel" { \ooo _ _ _ _ _ _ _ }
>>


_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to