-int
-Note_head::compare (Note_head *const &a, Note_head * const &b)
-{
- return sign(a->position_f () - b->position_f ());
+ Grob *stem = unsmob_grob (me->get_object ("stem"));
+ Direction stem_dir = stem ? get_grob_direction (stem) : CENTER;
+
+ if (stem_dir == CENTER)
+ programming_error ("must have stem dir for note head");
+
+ idx = prefix + ((stem_dir == UP) ? "u" : "d") + suffix;
+ out = fm->find_by_name (idx);
+ }
+
+
+ if (out.is_empty ())
+ {
+ me->warning (_f ("note head `%s' not found", idx.c_str ()));
+ out = Stencil (Box (Interval (0, 0), Interval (0, 0)), SCM_EOL);
+ }
+ else
+ *font_char = idx;
+
+ return out;