bug-lilypond
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

custom-style/custom-stencil-combination returns warning


From: Thomas Morley
Subject: custom-style/custom-stencil-combination returns warning
Date: Wed, 4 Apr 2018 02:09:44 +0200

The following code returns:
warning: none of note heads `noteheads.s' or `noteheads.u' found
although those noteheads shouldn't even be searched, imho

Ofcourse the 'style is unknown, but providing a custom-stencil should
be accepted.
Interestingly the warning prints only for the second note.

\version "2.19.81"

{
  \override NoteHead.style = #'foo
  \override NoteHead.stencil = #point-stencil
    c'1
    c'2
}

Ugly workaround:

{
  \override NoteHead.style = #'foo
  \override NoteHead.stencil =
  #(lambda (grob)
     (if (eq? (ly:grob-property grob 'style) 'foo)
         (begin
           (ly:grob-set-property! grob 'style '())
           point-stencil)
         (ly:note-head::print grob)))
    c'1
    c'2
    \revert NoteHead.style
    c'2
    c'1
}



reply via email to

[Prev in Thread] Current Thread [Next in Thread]