Module: wine Branch: master Commit: 4fbb13a2c85effcb7b0aed1d95eb54456995c6f8 URL: http://source.winehq.org/git/wine.git/?a=commit;h=4fbb13a2c85effcb7b0aed1d95...
Author: Aric Stewart aric@codeweavers.com Date: Wed Jun 8 10:12:27 2011 -0500
usp10: Bengali initial form is only applied to the beginning of words.
---
dlls/usp10/shape.c | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index bc22b4a..5d0c3d4 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); }