- {
- string font_char = to_string (dir) + stroke_style;
- Stencil stroke = fm->find_by_name ("flags." + font_char);
- if (stroke.is_empty ())
- me->warning (_f ("flag stroke `%s' not found", font_char));
- else
- flag.add_stencil (stroke);
- }
- }
+ {
+ string font_char = flag_style + to_string (dir) + stroke_style;
+ Stencil stroke = fm->find_by_name ("flags." + font_char);
+ if (stroke.is_empty ())
+ {
+ font_char = to_string (dir) + stroke_style;
+ stroke = fm->find_by_name ("flags." + font_char);
+ }
+ if (stroke.is_empty ())
+ me->warning (_f ("flag stroke `%s' not found", font_char));
+ else
+ flag.add_stencil (stroke);
+ }
+ }
+
+ return flag.smobbed_copy ();
+}
+
+
+Stencil
+Stem::flag (Grob *me)
+{
+ int log = duration_log (me);
+ if (log < 3
+ || unsmob_grob (me->get_object ("beam")))
+ return Stencil ();
+
+ if (!is_normal_stem (me))
+ return Stencil ();