The particular case here is:
* the last element of the row is an inset
* the row is broken by a display inset.
double w = 0;
//handle first the two bounds of the element
- if (i == pos || type != STRING)
- w = rtl ? width() : 0;
- else if (i == endpos)
+ if (i == endpos)
w = rtl ? 0 : width();
+ else if (i == pos || type != STRING)
+ w = rtl ? width() : 0;
else {
FontMetrics const & fm = theFontMetrics(font);
w = fm.pos2x(str, i - pos, font.isVisibleRightToLeft());