On 22.07.2013 12:31, David Kastrup wrote:
The settings of font-interface and text-interface become part of the
props alist list for markup interpretation.  At the time a markup is
interpreted, no information about a possibly responsible grob is
available, so no callbacks can be executed.
OK, so we could acknowledge the text-interface. Here only instrumentName doesn't implement text-interface(?)
tomorrow, I will look at it again ;)

Cheers, Jan-Peter
\version "2.16.1"

fontCheck =
#(make-engraver
  (acknowledgers
   ((text-interface engraver grob source-engraver)
    (ly:message "saw ~A coming from ~A" grob source-engraver)
    (ly:message "'text=~A" (markup->string (ly:grob-property grob 'text "???")))
    (let ((abs-font-size (ly:grob-property grob 'abs-font-size)))
      (if (and (number? abs-font-size)(> abs-font-size 0))
          (ly:grob-set-property! grob 'text (markup #:abs-fontsize abs-font-size (ly:grob-property grob 'text "???")))
          ))
    ))
  )

\layout {
  \context {
    \Score
    \consists #fontCheck
    \override TextScript #'abs-font-size = #24
    \override LyricText #'abs-font-size = #24
    \override InstrumentName #'abs-font-size = #24
    \override BarNumber #'abs-font-size = #24
  }
}

\new Staff \with {
  instrumentName = "Melodie"
  shortInstrumentName = "Mel"
} \new Voice { \repeat unfold 25 \relative c'' {
  bes4^"Hallo" a c b
} } \addlyrics { B A C H }

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

Reply via email to