Fix Arabic text rendering.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4708 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Dekel Tsur 2002-07-19 12:52:36 +00:00
parent 78c894f8ab
commit fb05e0df72
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,7 @@
2002-07-19 Dekel Tsur <dekelts@tau.ac.il>
* text.C (drawChars): Fix Arabic text rendering.
2002-07-18 John Levon <moz@compsoc.man.ac.uk> 2002-07-18 John Levon <moz@compsoc.man.ac.uk>
* LyXAction.C: * LyXAction.C:

View File

@ -630,6 +630,8 @@ void LyXText::drawChars(DrawRowParams & p, pos_type & vpos,
if (orig_font != getFont(p.bv->buffer(), p.row->par(), pos)) if (orig_font != getFont(p.bv->buffer(), p.row->par(), pos))
break; break;
if (arabic)
c = transformChar(c, p.row->par(), pos);
str += c; str += c;
++vpos; ++vpos;
} }
@ -676,7 +678,7 @@ bool LyXText::draw(DrawRowParams & p, pos_type & vpos)
if ((!hebrew && !arabic) if ((!hebrew && !arabic)
|| (hebrew && !Encodings::IsComposeChar_hebrew(c)) || (hebrew && !Encodings::IsComposeChar_hebrew(c))
|| (arabic && !Encodings::IsComposeChar_arabic(c))) { || (arabic && !Encodings::IsComposeChar_arabic(c))) {
drawChars(p, vpos, true, false); drawChars(p, vpos, hebrew, arabic);
} else if (hebrew) { } else if (hebrew) {
drawHebrewComposeChar(p, vpos); drawHebrewComposeChar(p, vpos);
} else if (arabic) { } else if (arabic) {