mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 10:00:33 +00:00
Fix logic error for spacing of RTL rows
The code referred to vpos (the visible position) instead of pos, the logical one. This can lead to using the wrong font when computing spaces width.
This commit is contained in:
parent
3599285019
commit
6ee39ff90a
@ -736,19 +736,19 @@ void RowPainter::paintText()
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use font span to speed things up, see above
|
// Use font span to speed things up, see above
|
||||||
if (vpos < font_span.first || vpos > font_span.last) {
|
if (!font_span.inside(pos)) {
|
||||||
font_span = par_.fontSpan(vpos);
|
font_span = par_.fontSpan(pos);
|
||||||
font = text_metrics_.displayFont(pit_, vpos);
|
font = text_metrics_.displayFont(pit_, pos);
|
||||||
|
|
||||||
// split font span if inline completion is inside
|
// split font span if inline completion is inside
|
||||||
if (font_span.first <= inlineCompletionVPos
|
if (inlineCompletionVPos != -1
|
||||||
&& font_span.last > inlineCompletionVPos)
|
&& font_span.inside(inlineCompletionPos.pos()))
|
||||||
font_span.last = inlineCompletionVPos;
|
font_span.last = inlineCompletionPos.pos();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that this value will only be used in
|
// Note that this value will only be used in
|
||||||
// situations where no ligature of composition of
|
// situations where no ligature of composition of
|
||||||
// characters is needed. (see comments alginuses of width_pos).
|
// characters is needed. (see comments in uses of width_pos).
|
||||||
const int width_pos = pm_.singleWidth(pos, font);
|
const int width_pos = pm_.singleWidth(pos, font);
|
||||||
|
|
||||||
Change const & change = par_.lookupChange(pos);
|
Change const & change = par_.lookupChange(pos);
|
||||||
|
Loading…
Reference in New Issue
Block a user