Aric Stewart : usp10: In Arabic only fallback to presentation form B for isolated glyphs.

Alexandre Julliard julliard at winehq.org
Mon Nov 21 11:10:06 CST 2011


Module: wine
Branch: master
Commit: ed15053837cada42ae3eb3cd59f229d4beb46581
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=ed15053837cada42ae3eb3cd59f229d4beb46581

Author: Aric Stewart <aric at codeweavers.com>
Date:   Sun Nov 20 21:02:58 2011 -0700

usp10: In Arabic only fallback to presentation form B for isolated glyphs.

---

 dlls/usp10/shape.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index 7464b4a..bd383b9 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -1567,13 +1567,16 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
 
         if (!shaped)
         {
-            WORD newGlyph = pwOutGlyphs[i];
-            if (pwcChars[i] >= FIRST_ARABIC_CHAR && pwcChars[i] <= LAST_ARABIC_CHAR)
+            if (context_shape[i] == Xn)
             {
-                /* fall back to presentation form B */
-                WCHAR context_char = wine_shaping_forms[pwcChars[i] - FIRST_ARABIC_CHAR][context_shape[i]];
-                if (context_char != pwcChars[i] && GetGlyphIndicesW(hdc, &context_char, 1, &newGlyph, 0) != GDI_ERROR && newGlyph != 0x0000)
-                    pwOutGlyphs[i] = newGlyph;
+                WORD newGlyph = pwOutGlyphs[i];
+                if (pwcChars[i] >= FIRST_ARABIC_CHAR && pwcChars[i] <= LAST_ARABIC_CHAR)
+                {
+                    /* fall back to presentation form B */
+                    WCHAR context_char = wine_shaping_forms[pwcChars[i] - FIRST_ARABIC_CHAR][context_shape[i]];
+                    if (context_char != pwcChars[i] && GetGlyphIndicesW(hdc, &context_char, 1, &newGlyph, 0) != GDI_ERROR && newGlyph != 0x0000)
+                        pwOutGlyphs[i] = newGlyph;
+                }
             }
             i++;
         }




More information about the wine-cvs mailing list