Commit 0c141954 authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

usp10: Apply 'ccmp' before Arabic contextual shaping.

parent e2d4cf9e
...@@ -1128,9 +1128,19 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p ...@@ -1128,9 +1128,19 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
if (psc->GSUB_Table) if (psc->GSUB_Table)
{ {
INT nextIndex; INT nextIndex, offset = 0;
INT prevCount = *pcGlyphs; INT prevCount = *pcGlyphs;
/* Apply CCMP first */
apply_GSUB_feature_to_glyph(hdc, psa, psc, pwOutGlyphs, glyph_index, dirL, pcGlyphs, "ccmp");
if (prevCount != *pcGlyphs)
{
offset = *pcGlyphs - prevCount;
if (dirL < 0)
glyph_index -= offset * dirL;
}
/* Apply the contextual feature */ /* Apply the contextual feature */
nextIndex = apply_GSUB_feature_to_glyph(hdc, psa, psc, pwOutGlyphs, glyph_index, dirL, pcGlyphs, contextual_features[context_shape[char_index]]); nextIndex = apply_GSUB_feature_to_glyph(hdc, psa, psc, pwOutGlyphs, glyph_index, dirL, pcGlyphs, contextual_features[context_shape[char_index]]);
...@@ -1138,7 +1148,13 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p ...@@ -1138,7 +1148,13 @@ static void ContextualShape_Arabic(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS *p
{ {
UpdateClusters(glyph_index, *pcGlyphs - prevCount, dirL, cChars, pwLogClust); UpdateClusters(glyph_index, *pcGlyphs - prevCount, dirL, cChars, pwLogClust);
char_index += dirL; char_index += dirL;
glyph_index = nextIndex; if (!offset)
glyph_index = nextIndex;
else
{
offset = *pcGlyphs - prevCount;
glyph_index += dirL * (offset + 1);
}
} }
shaped = (nextIndex > GSUB_E_NOGLYPH); shaped = (nextIndex > GSUB_E_NOGLYPH);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment