From 6c3398d9574e449628bfdaf250661104935db7a0 Mon Sep 17 00:00:00 2001 From: Aric Stewart Date: Mon, 14 Nov 2011 13:17:37 -0700 Subject: [PATCH] usp10: Pay attention to script changes for bidi run itemization. --- dlls/usp10/usp10.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/usp10/usp10.c b/dlls/usp10/usp10.c index 0ffab667c95..50e8471b953 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;