- s = lookup_l ()->time_signature (args_);
- s.translate_axis (-s.extent ()[Y_AXIS].center (), Y_AXIS);
- return new Molecule (Atom (s));
+ return time_signature (me, n,d).smobbed_copy ();
+}
+
+Molecule
+Time_signature::special_time_signature (Grob*me, String s, int n, int d)
+{
+ /*
+ Randomly probing the font sucks?
+ */
+
+ SCM alist_chain = Font_interface::font_alist_chain (me);
+
+ SCM style_chain =
+ Font_interface::add_style (me, ly_symbol2scm ("timesig-symbol"),
+ alist_chain);
+
+ Font_metric *feta = Font_interface::get_font (me, style_chain);
+
+ /*
+ First guess: s contains only the signature style, append fraction.
+ */
+ String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
+
+ Molecule m = feta->find_by_name (symbolname);
+ if (!m.empty_b())
+ return m;
+
+ /*
+ Second guess: s contains the full signature name
+ */
+ m = feta->find_by_name ("timesig-" + s);
+ if (!m.empty_b ())
+ return m;
+
+ // Resort to default layout with numbers
+ return time_signature (me, n, d);