Henri Verbeet : usp10: Properly determine the glyph run direction when shaping Script_Arabic.
Alexandre Julliard
julliard at winehq.org
Mon Mar 6 15:25:08 CST 2017
Module: wine
Branch: master
Commit: f13dea5684f2fe3d93981d98a761995a44bce7bb
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f13dea5684f2fe3d93981d98a761995a44bce7bb
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Thu Mar 2 09:38:42 2017 +0100
usp10: Properly determine the glyph run direction when shaping Script_Arabic.
In particular, if fLogicalOrder and fRTL are both set, the glyph order is
swapped compared to the character order. In all other cases it's the same.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Aric Stewart <aric at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/usp10/shape.c | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index aa98366..ce19465 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -1055,15 +1055,15 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
return;
}
- if (!psa->fLogicalOrder && psa->fRTL)
+ if (psa->fLogicalOrder && psa->fRTL)
{
- dirR = 1;
- dirL = -1;
+ dirR = -1;
+ dirL = 1;
}
else
{
- dirR = -1;
- dirL = 1;
+ dirR = 1;
+ dirL = -1;
}
load_ot_tables(hdc, psc);
@@ -2946,20 +2946,20 @@ static void ShapeCharGlyphProp_Arabic( HDC hdc, ScriptCache *psc, SCRIPT_ANALYSI
spaces = HeapAlloc(GetProcessHeap(),0,cGlyphs);
memset(spaces,0,cGlyphs);
- if (!psa->fLogicalOrder && psa->fRTL)
- {
- initGlyph = cGlyphs-1;
- finaGlyph = 0;
- dirR = 1;
- dirL = -1;
- }
- else
+ if (psa->fLogicalOrder && psa->fRTL)
{
initGlyph = 0;
finaGlyph = cGlyphs-1;
dirR = -1;
dirL = 1;
}
+ else
+ {
+ initGlyph = cGlyphs-1;
+ finaGlyph = 0;
+ dirR = 1;
+ dirL = -1;
+ }
for (i = 0; i < cGlyphs; i++)
{
More information about the wine-cvs
mailing list