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@codeweavers.com>
Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-03-07 08:57:27 +01:00 committed by Alexandre Julliard
parent 36c5252265
commit 502d23986c
1 changed files with 7 additions and 1 deletions

View File

@ -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)