Module: wine Branch: master Commit: 6c3398d9574e449628bfdaf250661104935db7a0 URL: http://source.winehq.org/git/wine.git/?a=commit;h=6c3398d9574e449628bfdaf250...
Author: Aric Stewart aric@codeweavers.com Date: Mon Nov 14 13:17:37 2011 -0700
usp10: Pay attention to script changes for bidi run itemization.
---
dlls/usp10/usp10.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 0ffab66..50e8471 100644 --- a/dlls/usp10/usp10.c +++ b/dlls/usp10/usp10.c @@ -859,7 +859,10 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int for (i = 0; i < cInChars; i++) { if ((levels[i] == 0 || (odd(psState->uBidiLevel) && levels[i] == psState->uBidiLevel+1)) && inNumber && strchrW(math_punc,pwcInChars[i])) + { + scripts[i] = Script_Numeric; levels[i] = 2; + } else if ((levels[i] == 0 || (odd(psState->uBidiLevel) && levels[i] == psState->uBidiLevel+1)) && scripts[i] == Script_Numeric) { levels[i] = 2; @@ -982,7 +985,7 @@ HRESULT WINAPI ScriptItemizeOpenType(const WCHAR *pwcInChars, int cInChars, int new_run = TRUE; } /* changes in script */ - else if ((!levels) && (((pwcInChars[cnt] != Numeric_space) && (New_Script != -1) && (New_Script != pItems[index].a.eScript)) || (New_Script == Script_Control))) + else if (((pwcInChars[cnt] != Numeric_space) && (New_Script != -1) && (New_Script != pItems[index].a.eScript)) || (New_Script == Script_Control)) { TRACE("Script break(%i/%i)\n",pItems[index].a.eScript,New_Script); new_run = TRUE;