+ String glyph_string = ly_scm2string (glyph);
+
+ /* compose span_bar_mol */
+ Stencil span_bar_mol;
+
+ Interval prev_extent;
+ for (SCM elts = first_elt; scm_is_pair (elts); elts = scm_cdr (elts))
+ {
+ SCM smobbed_staff_bar = scm_car (elts);
+ Grob *staff_bar = unsmob_grob (smobbed_staff_bar);
+ Interval ext = staff_bar->extent (refp, Y_AXIS);
+ if (ext.is_empty ())
+ continue;
+
+ if (!prev_extent.is_empty ())
+ {
+ Interval l (prev_extent [UP],
+ ext[DOWN]);
+
+ if (l.is_empty ())
+ {
+ /* There is overlap between the bar lines. Do nothing. */
+ }
+ else
+ {
+ Stencil interbar = Bar_line::compound_barline (staff_bar,
+ glyph_string,
+ l.length ());
+ interbar.translate_axis (l.center (), Y_AXIS);
+ span_bar_mol.add_stencil (interbar);
+ }
+ }
+ prev_extent = ext;
+ }
+
+ span_bar_mol.translate_axis (- me->relative_coordinate (refp, Y_AXIS),
+ Y_AXIS);
+
+ return span_bar_mol.smobbed_copy ();