Module: wine Branch: master Commit: 746679e186c1dfa50b799407d315e8fd030374a9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=746679e186c1dfa50b799407d3...
Author: Aric Stewart aric@codeweavers.com Date: Wed Dec 7 08:30:49 2011 -0600
usp10: Handle dangling joiners when processing Indic GlyphProps.
---
dlls/usp10/shape.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/shape.c b/dlls/usp10/shape.c index 5b9bb56..4ee658e 100644 --- a/dlls/usp10/shape.c +++ b/dlls/usp10/shape.c @@ -3302,7 +3302,11 @@ static void ShapeCharGlyphProp_BaseIndic( HDC hdc, ScriptCache *psc, SCRIPT_ANAL break; case lex_ZWJ: case lex_ZWNJ: - k = char_count; + /* check for dangling joiners */ + if (pwcChars[char_index[k]-1] == 0x0020 || pwcChars[char_index[k]+1] == 0x0020) + pGlyphProp[i].sva.fClusterStart = 1; + else + k = char_count; break; default: pGlyphProp[i].sva.fClusterStart = 1;