+/*
+ * Some styles do not provide all flavours of accidentals, e.g. there
+ * is currently no sharp accidental in vaticana style. In these cases
+ * this function falls back to one of the other styles.
+ */
+
+/*
+ todo: this sort of stuff in Scheme. --hwn.
+*/
+string
+Accidental_interface::get_fontcharname (string style, int alteration)
+{
+ if (alteration == DOUBLE_FLAT
+ || alteration == DOUBLE_SHARP)
+ return to_string (alteration);
+
+ if (style == "hufnagel")
+ switch (alteration)
+ {
+ case FLAT: return "hufnagel-1";
+ case 0: return "vaticana0";
+ case SHARP: return "mensural1";
+ }
+ if (style == "medicaea")
+ switch (alteration)
+ {
+ case FLAT: return "medicaea-1";
+ case 0: return "vaticana0";
+ case SHARP: return "mensural1";
+ }
+ if (style == "vaticana")
+ switch (alteration)
+ {
+ case FLAT: return "vaticana-1";
+ case 0: return "vaticana0";
+ case SHARP: return "mensural1";
+ }
+ if (style == "mensural")
+ switch (alteration)
+ {
+ case FLAT: return "mensural-1";
+ case 0: return "vaticana0";
+ case SHARP: return "mensural1";
+ }
+
+ if (style == "neomensural")
+ style = ""; // currently same as default
+ if (style == "default")
+ style = "";
+ return style + to_string (alteration);
+}
+
+MAKE_SCHEME_CALLBACK (Accidental_interface, print, 1);