+ if ((full_collide
+ || ((close_half_collide || distant_half_collide)
+ && to_boolean (me->get_property ("prefer-dotted-right"))))
+ && Rhythmic_head::dot_count (head_up) < Rhythmic_head::dot_count (head_down))
+ {
+ shift_amount = -1;
+ if (!touch)
+ // remember to leave clearance between stems
+ stem_to_stem = true;
+ }
+ else if (touch)
+ {
+ // Up-stem note on a line has a raised dot, so no risk of collision
+ Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
+ if ((full_collide
+ || (!Staff_symbol_referencer::on_line (staff, ups[0])
+ && to_boolean (me->get_property ("prefer-dotted-right"))))
+ && Rhythmic_head::dot_count (head_up) > Rhythmic_head::dot_count (head_down))
+ touch = false;
+ else
+ shift_amount = -1;
+ }
+
+ /* The solfa is a triangle, which is inverted depending on stem
+ direction. In case of a collision, one of them should be removed,
+ so the resulting note does not look like a block.
+ */
+ SCM up_style = head_up->get_property ("style");
+ SCM down_style = head_down->get_property ("style");
+ if (merge_possible
+ && (up_style == ly_symbol2scm ("fa") || up_style == ly_symbol2scm ("faThin"))
+ && (down_style == ly_symbol2scm ("fa") || down_style == ly_symbol2scm ("faThin")))
+ {
+ Offset att = Offset (0.0, -1.0);
+ head_up->set_property ("stem-attachment", ly_offset2scm (att));
+ head_up->set_property ("transparent", SCM_BOOL_T);
+ }