-xNotesOn =
-#(define-music-function (parser location) ()
- (_i "Set the default note head style to a cross-shaped style.")
- (context-spec-music
- (override-head-style '(TabNoteHead NoteHead) 'cross) 'Bottom))
+#(define (cross-style grob)
+;; Returns the symbol 'cross to set the 'style-property for (Tab-)NoteHead.
+;; If the current text-font doesn't contain the glyph set 'font-name to '()
+;; and 'font-family to 'feta.
+;; If 'feta is replaced by another music-font without cross-style-glyphs
+;; note-head.cc throws a warning and no visual output happens.
+ (let* ((layout (ly:grob-layout grob))
+ (props (ly:grob-alist-chain grob))
+ (font (ly:paper-get-font layout props))
+ (font-unknown? (string=? (ly:font-name font) "unknown")))
+ (if font-unknown?
+ (begin
+ (ly:grob-set-property! grob 'font-name '())
+ (ly:grob-set-property! grob 'font-family 'feta)))
+ 'cross))
+
+%% Set the default note head style to a cross-shaped style.
+xNotesOn = {
+ \temporary \override NoteHead.style = #cross-style
+ \temporary \override TabNoteHead.style = #cross-style
+}
+