+ String char_name = style + to_string (n) + "/" + to_string (d);
+ me->set_grob_property ("font-family", ly_symbol2scm ("music"));
+ Molecule out = Font_interface::get_default_font (me)
+ ->find_by_name ("timesig-" + char_name);
+ if (!out.empty_b ())
+ return out;
+
+ /* If there is no such symbol, we default to the numbered style.
+ (Here really with a warning!) */
+ me->warning (_f ("time signature symbol `%s' not found; "
+ "reverting to numbered style", char_name));
+ return numbered_time_signature (me, n, d);
+}
+
+Molecule
+Time_signature::numbered_time_signature (Grob*me,int num, int den)
+{
+ SCM chain = Font_interface::font_alist_chain (me);
+ me->set_grob_property ("font-family", ly_symbol2scm ("number"));
+
+ Molecule n =
+ Text_item::interpret_new_markup (me->self_scm(), chain,scm_makfrom0str (to_string (num).to_str0 ()));
+
+ Molecule d =
+ Text_item::interpret_new_markup (me->self_scm(), chain,scm_makfrom0str (to_string (den).to_str0 ()));
+ n.align_to (X_AXIS, CENTER);
+ d.align_to (X_AXIS, CENTER);
+ Molecule m;
+ if (den)
+ {
+ m.add_at_edge (Y_AXIS, UP, n, 0.0, 0);
+ m.add_at_edge (Y_AXIS, DOWN, d, 0.0,0);
+ }
+ else
+ {
+ m = n;
+ m.align_to (Y_AXIS, CENTER);
+ }
+
+ m.align_to (X_AXIS, LEFT);
+
+ return m;
+}