+ Interval span_points (0, 0);
+
+ /*
+ For raggedright without ragged staffs, simply set width to the linewidth.
+
+ (ok -- lousy UI, since width is in staff spaces)
+
+ --hwn.
+ */
+ Real t = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ t *= robust_scm2double (me->get_property ("thickness"), 1.0);
+
+ Direction d = LEFT;
+ do
+ {
+ SCM width_scm = me->get_property ("width");
+ if (d == RIGHT && scm_is_number (width_scm))
+ {
+ /*
+ don't multiply by Staff_symbol_referencer::staff_space (me),
+ since that would make aligning staff symbols of different sizes to
+ one right margin hell.
+ */
+ span_points[RIGHT] = scm_to_double (width_scm);
+ }
+ else
+ {
+ Item *x = sp->get_bound (d);
+
+ span_points[d] = x->relative_coordinate (common, X_AXIS);
+ if (!x->break_status_dir ()
+ && !x->extent (x, X_AXIS).is_empty ())
+ span_points[d] += x->extent (x, X_AXIS)[d];
+ }
+
+ span_points[d] -= d* t / 2;