mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-22 16:37:28 +00:00
Two fixes involving RtL text drawing
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10513 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
c16067dbba
commit
fe1c0c435b
@ -1,3 +1,7 @@
|
||||
2005-10-03 Martin Vermeer <martin.vermeer@hut.fi>
|
||||
|
||||
* text.C (cursorX): two fixes involving RtL text drawing
|
||||
|
||||
2005-10-03 Jean-Marc Lasgouttes <lasgouttes@lyx.org>
|
||||
|
||||
* text3.C (dispatch): when invoking LFUN_MATH_MACRO with no type
|
||||
|
10
src/text.C
10
src/text.C
@ -2127,11 +2127,19 @@ int LyXText::cursorX(CursorSlice const & sl, bool boundary) const
|
||||
|
||||
// see correction above
|
||||
if (boundary_correction)
|
||||
if (getFont(par, ppos).isRightToLeft())
|
||||
if (getFont(par, ppos).isVisibleRightToLeft())
|
||||
x -= singleWidth(par, ppos);
|
||||
else
|
||||
x += singleWidth(par, ppos);
|
||||
|
||||
// Make sure inside an inset we always count from the left
|
||||
// edge (bidi!) -- MV
|
||||
if (sl.pos() < par.size()) {
|
||||
font = getFont(par, sl.pos());
|
||||
if (!boundary && font.isVisibleRightToLeft()
|
||||
&& par.isInset(sl.pos()))
|
||||
x -= par.getInset(sl.pos())->width();
|
||||
}
|
||||
return int(x);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user