lilypond-user
[Top][All Lists]
Advanced

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

Re: Using SMuFL accidental glyphs


From: Andrew Bernard
Subject: Re: Using SMuFL accidental glyphs
Date: Mon, 29 Apr 2019 01:22:05 +1000

Answering my own query, this may be useful for others searching the archives in the future. This example uses the openlilylib custom-music-fonts code to load Bravura, and this example shows how a SMuFL glyph can be used as an accidental. Quite handy, even if I do so day myself.

[Obviously this wont compile unless you have openlilylib set up. It's illustrative.]

Andrew

%======

\version "2.21.0"

\include "custom-music-fonts/smufl/definitions.ily"

accidentalHalfSharpArrowUp =
#(define-music-function (note)
   (ly:music?)
   #{ \once \override Voice.Accidental.stencil =
      #ly:text-interface::print
      \once \override Voice.Accidental.text =
      \markup {
        \smuflglyph "accidentalHalfSharpArrowUp"
      }
      $note #})


treble = {
  d'4 \accidentalHalfSharpArrowUp des'4
}

\score {
  \new Staff { \treble }
  \layout {
    \context {
      \Score
      \accidentalStyle dodecaphonic
    }
  }
}

%======


reply via email to

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