+ {
+ primitive->programming_error ("Vaticana_ligature:"
+ " delta-position undefined ->"
+ " ignoring grob");
+ continue;
+ }
+
+ /* retrieve & complete prefix_set and context_info */
+ int prefix_set
+ = scm_to_int (primitive->get_property ("prefix-set"));
+ int context_info
+ = scm_to_int (primitive->get_property ("context-info"));
+
+ if (Rhythmic_head::dot_count (primitive) > 0)
+ // remove dots from primitive and add remember primitive for
+ // creating a dot column
+ {
+ Rhythmic_head::get_dots (primitive)->set_property ("dot-count",
+ scm_from_int (0));
+ // TODO: Maybe completely remove grob "Dots" (dots->suicide
+ // () ?) rather than setting property "dot-count" to 0.
+
+ check_for_ambiguous_dot_pitch (primitives[i]);
+ augmented_primitives_.push_back (primitives[i]);
+ }
+ else if (augmented_primitives_.size () > 0)
+ {
+ primitive->warning ("This ligature has a dotted head followed by"
+ " a non-dotted head. The ligature should be"
+ " split after the last dotted head before"
+ " this head.");
+ }
+
+ 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)
+ {
+ // initio debilis
+ glyph_name = "vaticana.reverse.plica";
+ }
+ else if (prev_delta_pitch > 0)
+ {
+ // epiphonus
+ if (! (prev_context_info & FLEXA_RIGHT))
+ {
+ /* correct head of previous primitive */
+ if (prev_delta_pitch > 1)
+ prev_glyph_name = "vaticana.epiphonus";
+ else
+ prev_glyph_name = "vaticana.vepiphonus";
+ }
+ if (prev_delta_pitch > 1)
+ glyph_name = "vaticana.plica";
+ else
+ glyph_name = "vaticana.vplica";
+ }
+ else if (prev_delta_pitch < 0)
+ {
+ // cephalicus
+ if (! (prev_context_info & FLEXA_RIGHT))
+ /* correct head of previous primitive */
+ {
+ if (i > 1)
+ {
+ /* cephalicus head with fixed size cauda */
+ prev_glyph_name = "vaticana.inner.cephalicus";
+ }
+ else
+ {
+ /* cephalicus head without cauda */
+ prev_glyph_name = "vaticana.cephalicus";
+ }
+
+ /*
+ * Flexa has no variable size cauda if its left head is
+ * stacked on the right head. This is true for
+ * cephalicus. Hence, remove the cauda.
+ *
+ * Urgh: for the current implementation, this rule only
+ * applies for cephalicus; but it is a fundamental rule.
+ * Therefore, the following line of code should be
+ * placed somewhere else.
+ */
+ prev_primitive->set_property ("add-cauda",
+ ly_bool2scm (false));
+ }
+ if (prev_delta_pitch < - 1)
+ glyph_name = "vaticana.reverse.plica";
+ else
+ glyph_name = "vaticana.reverse.vplica";
+ }
+ else // (prev_delta_pitch == 0)
+ {
+ primitive->programming_error ("Vaticana_ligature:"
+ " deminutum head must have different"
+ " pitch -> ignoring grob");
+ }
+ }
+ else if (prefix_set & (CAVUM | LINEA))
+ if ((prefix_set & CAVUM) && (prefix_set & LINEA))
+ glyph_name = "vaticana.linea.punctum.cavum";
+ else if (prefix_set & CAVUM)
+ glyph_name = "vaticana.punctum.cavum";
+ else
+ glyph_name = "vaticana.linea.punctum";
+ else if (prefix_set & AUCTUM)
+ if (prefix_set & ASCENDENS)
+ glyph_name = "solesmes.auct.asc";
+ else
+ glyph_name = "solesmes.auct.desc";
+ else if ((context_info & STACKED_HEAD)
+ && (context_info & PES_UPPER))
+ if (prev_delta_pitch > 1)
+ glyph_name = "vaticana.upes";
+ else
+ glyph_name = "vaticana.vupes";