- /*
- * If the head for the current primitive represents the right head
- * of a flexa or the upper head of a pes, then this may affect the
- * shape of the previous head.
- */
- if (prefix_set & PES_OR_FLEXA)
- {
- if ((context_info & FLEXA_RIGHT) && (context_info & PES_LOWER))
+ if (is_stacked_head (prefix_set, context_info))
+ {
+ context_info |= STACKED_HEAD;
+ primitive->set_property ("context-info",
+ scm_from_int (context_info));
+ }
+
+ /*
+ * Now determine which head to typeset (this is context sensitive
+ * information, since it depends on neighbouring heads; therefore,
+ * this decision must be made here in the engraver rather than in
+ * the backend).
+ */
+ string glyph_name;
+ if (prefix_set & VIRGA)
+ {
+ glyph_name = "vaticana.punctum";
+ primitive->set_property ("add-stem", ly_bool2scm (true));
+ }
+ else if (prefix_set & QUILISMA)
+ glyph_name = "vaticana.quilisma";
+ else if (prefix_set & ORISCUS)
+ glyph_name = "solesmes.oriscus";
+ else if (prefix_set & STROPHA)
+ if (prefix_set & AUCTUM)
+ glyph_name = "solesmes.stropha.aucta";
+ else glyph_name = "solesmes.stropha";
+ else if (prefix_set & INCLINATUM)
+ if (prefix_set & AUCTUM)
+ glyph_name = "solesmes.incl.auctum";
+ else if (prefix_set & DEMINUTUM)
+ glyph_name = "solesmes.incl.parvum";
+ else
+ glyph_name = "vaticana.inclinatum";
+ else if (prefix_set & DEMINUTUM)
+ if (i == 0)