Module: wine
Branch: master
Commit: 502d23986c90f8b5fe61e690f78c811a1192b7a6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=502d23986c90f8b5fe61e690f…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Tue Mar 7 08:57:27 2017 +0100
usp10: Do not fall back to presentation form B if the contextual feature exists in ContextualShape_Arabic().
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(a)codeweavers.com>
Signed-off-by: Aric Stewart <aric(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
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)