From 4fbb13a2c85effcb7b0aed1d95eb54456995c6f8 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Wed, 8 Jun 2011 10:12:27 -0500 Subject: [PATCH] usp10: Bengali initial form is only applied to the beginning of words. --- dlls/usp10/shape.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index bc22b4a3fd3..5d0c3d4a9b0 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -471,7 +471,6 @@ static OPENTYPE_FEATURE_RECORD bengali_features[] = { MS_MAKE_TAG('v','a','t','u'), 1}, { MS_MAKE_TAG('c','j','c','t'), 1}, /* Presentation forms */ - { MS_MAKE_TAG('i','n','i','t'), 1}, { MS_MAKE_TAG('p','r','e','s'), 1}, { MS_MAKE_TAG('a','b','v','s'), 1}, { MS_MAKE_TAG('b','l','w','s'), 1}, @@ -2204,6 +2203,19 @@ static void ContextualShape_Bengali(HDC hdc, ScriptCache *psc, SCRIPT_ANALYSIS * GetGlyphIndicesW(hdc, input, cCount, pwOutGlyphs, 0); *pcGlyphs = cCount; + /* Step 3: Initial form is only applied to the beginning of words */ + for (cCount = cCount - 1 ; cCount >= 0; cCount --) + { + if (cCount == 0 || input[cCount] == 0x0020) /* space */ + { + int index = cCount; + int gCount = 1; + if (index > 0) index++; + + apply_GSUB_feature_to_glyph(hdc, psa, psc, &pwOutGlyphs[index], 0, 1, &gCount, "init"); + } + } + HeapFree(GetProcessHeap(),0,input); }