+/*
+ make this function easily usable in C++
+ */
+String
+Rest::glyph_name (Grob *me, int balltype, String style)
+{
+ bool ledgered_b = false;
+
+ if (balltype == 0 || balltype == 1)
+ {
+ Real rad = Staff_symbol_referencer::staff_radius (me) * 2.0;
+ Real pos = Staff_symbol_referencer::get_position (me);
+
+ /*
+ Figure out when the rest is far enough outside the staff. This
+ could bemore generic, but hey, we understand this even after
+ dinner.
+ */
+ ledgered_b |= (balltype == 0) && (pos >= +rad + 2 || pos < -rad);
+ ledgered_b |= (balltype == 1) && (pos <= -rad - 2 || pos > +rad);
+ }
+
+ String actual_style (style.to_str0 ());
+
+ if ((style == "mensural") || (style == "neo_mensural")) {
+
+ /*
+ FIXME: Currently, ancient font does not provide ledgered rests;
+ hence the "o" suffix in the glyph name is bogus. But do we need
+ ledgered rests at all now that we can draw ledger lines with
+ variable width, length and blotdiameter? -- jr
+ */
+ ledgered_b = 0;
+
+ /*
+ There are no 32th/64th/128th mensural/neo_mensural rests. In
+ these cases, revert back to default style.
+ */
+ if (balltype > 4)
+ actual_style = "";
+ }
+
+ if ((style == "classical") && (balltype != 2)) {
+ /*
+ classical style: revert back to default style for any rest other
+ than quarter rest
+ */
+ actual_style = "";
+ }