[PATCH 4/5] usp10: Properly determine the glyph run direction when shaping Script_Arabic.
Aric Stewart
aric at codeweavers.com
Mon Mar 6 12:16:29 CST 2017
Signed-off-by: Aric Stewart <aric at codeweavers.com>
On 3/2/17 2:38 AM, Henri Verbeet wrote:
> 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>
> ---
> 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-patches
mailing list