- Font_metric * fm = Font_interface::get_default_font (me);
- Stencil out = fm->find_by_name (font_char);
+ Font_metric *fm = Font_interface::get_default_font (me);
+
+ Direction stem_dir = CENTER;
+ if (Grob *stem = unsmob_grob (me->get_property ("stem")))
+ {
+ stem_dir = get_grob_direction (stem);
+ if (stem_dir == CENTER)
+ {
+ programming_error ("Must have stem dir for note head");
+ }
+ }
+
+ Stencil out;
+
+ String prefix = "noteheads.";
+ String idx
+ = prefix + ((stem_dir == UP) ? "u" : "d") + ly_scm2string (scm_font_char);
+ out = fm->find_by_name (idx);
+ if (out.is_empty ())
+ {
+ idx = prefix + "s" + ly_scm2string (scm_font_char);
+ out = fm->find_by_name (idx);
+ }
+