[PATCH 3/5] usp10: Do not fall back to presentation form B if the contextual feature exists in ContextualShape_Arabic().

Henri Verbeet hverbeet at codeweavers.com
Tue Mar 7 01:57:27 CST 2017


E.g., the base form of 'ا' may be the same as the isolated form, in which case
the "isol" feature may not have a substitution for it. At the same time, while
the presentation form B glyph may look the same or similar as the base form,
it may have a different glyph ID. This can break e.g.
GSUB_LOOKUP_CONTEXT_CHAINED substitutions because of the unexpected glyph ID.

Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
 dlls/usp10/shape.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c
index ce19465..9d07e5b 100644
--- a/dlls/usp10/shape.c
+++ b/dlls/usp10/shape.c
@@ -1129,8 +1129,14 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
                     offset = *pcGlyphs - prevCount;
                     glyph_index += dirL * (offset + 1);
                 }
+                shaped = TRUE;
+            }
+            else if (nextIndex == GSUB_E_NOGLYPH)
+            {
+                char_index += dirL;
+                glyph_index += dirL;
+                shaped = TRUE;
             }
-            shaped = (nextIndex > GSUB_E_NOGLYPH);
         }
 
         if (!shaped)
-- 
2.1.4




More information about the wine-patches mailing list