Hi Urs, in an articulation event the font is emmentaler and not a normal one. So in the trill-list part you have to switch back to normal text with \markup \normal-text "T"
HTH Jan-Peter Am 20.02.19 um 17:23 schrieb Urs Liska: > Hi, > > I haven't got any further, but ... > > Am 20.02.19 um 11:53 schrieb Urs Liska: >> >> I'm trying to create an articulation printing a glyph from the >> "regular" text font. >> >> ... > > > I moved all the relevant code into an MWE, which might trigger more > ideas than the abstract excerpt I originally posted. > > The problem is that I can create a custom articulation using a stencil > made from \markup \musicglyph "something" but not from \markup "Something". > > I'd be really thankful about any push in the right direction, since I > have no clue as to where even start searching. > > Best > Urs > > \version "2.19.82" > > % The "asterisk" *does* work properly > #(define asterisk-list > `("asterisk" > . ((stencil . ,ly:text-interface::print) > (text . ,#{ \markup \musicglyph "pedal.*" #}) > ; any other properties > (padding . 0.5) > (avoid-slur . around) > (direction . ,DOWN) > (script-priority . 125) > ))) > > % The "trill" fails, complaining in a programming error that it "Cannot get a > text stencil from this font" > #(define trill-list > `("trill" > . ((stencil . ,ly:text-interface::print) > (text . ,#{ \markup "T" #}) > ; any other properties > (padding . 0.5) > (avoid-slur . around) > (direction . ,DOWN) > (script-priority . 75) > ))) > > %% A macro setting the lists from above in the copy of `default-script-alist´ > %% For now, every new script has to be inserted in a single run. > %% TODO > %% Probably better to do simpler list processing with append, cons etc > #(define-macro (set-my-script-alist! ls-1 ls-2) > "Creates a new key-value-pair, taken from ls-2, in ls-1" > `(set! ,ls-1 > (if (and (pair? ,ls-2) (pair? (cadr ,ls-2))) > (assoc-set! ,ls-1 (car ,ls-2) (cdr ,ls-2)) > (begin > (ly:warning (_"Unsuitable list\n\t~a \n\tdetected, ignoring. > ") ,ls-2) > ,ls-1)))) > > #(set-my-script-alist! default-script-alist asterisk-list) > #(set-my-script-alist! default-script-alist trill-list) > > \layout { > \context { > \Score > scriptDefinitions = #default-script-alist > } > } > > asterisk-artic = #(make-articulation "asterisk") > trill-artic = #(make-articulation "trill") > > > > tt = > #(define-event-function ()() > #{ > -\trill-artic > #}) > > asterisk = > #(define-event-function ()() > #{ > -\tweak font-size 0 > -\asterisk-artic > #}) > > > \relative { > c'' \asterisk > c \tt > } > > > _______________________________________________ > lilypond-user mailing list > lilypond-user@gnu.org > https://lists.gnu.org/mailman/listinfo/lilypond-user > _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user