Dear community,
I have a problem with a sheme-function that does'nt work any more.
I get the error message:

> wrong type for argument 1.  Expecting character, found "D"
>  \markup {   \slashed-char
>                            #"D"     }
>

I need it a slashed letter, it is necessary for some symbols  used in
harmony classes in german music theory.
Here's the script:

\version "2.16.0"
% Inspired by slashed-digit from scm/define-markup.scm:
#(define-markup-command (slashed-char layout props ch) (char?)
"A character, with slash."
(let*
((mag (magstep (chain-assoc-get 'font-size props 0)))
(thickness
(* mag
(ly:output-def-lookup layout 'line-thickness)
(chain-assoc-get 'thickness props 1.6)))
(char-stencil (interpret-markup layout props ch))
(num-x (interval-widen (ly:stencil-extent char-stencil X)
(* mag 0.1)))
(num-y (ly:stencil-extent char-stencil Y))
(is-sane (and (interval-sane? num-x) (interval-sane? num-y)))
(slash-stencil
(if is-sane
(ly:make-stencil
`(draw-line
,thickness
,(car num-x) ,(car num-y)
,(cdr num-x) ,(cdr num-y))
num-x num-y)
#f)))
(ly:stencil-add char-stencil slash-stencil)))
 \markup {   \slashed-char #"D"     }
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to