usp10: Itemise ZWSP like ZWNJ and ZWJ.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
721fbf617b
commit
d00f7315e0
|
@ -1799,7 +1799,7 @@ static void test_ScriptShape(HDC hdc)
|
|||
chars[1] = c;
|
||||
hr = ScriptItemize(chars, 3, 4, NULL, NULL, items, &nb);
|
||||
ok(hr == S_OK, "%s: [%02x] expected S_OK, got %08x\n", lf.lfFaceName, c, hr);
|
||||
todo_wine_if(c == 0x200b) ok(nb == test_data[j].item_count, "%s: [%02x] Got unexpected item count %d.\n",
|
||||
ok(nb == test_data[j].item_count, "%s: [%02x] Got unexpected item count %d.\n",
|
||||
lf.lfFaceName, c, nb);
|
||||
item = &items[test_data[j].item];
|
||||
|
||||
|
|
|
@ -1363,7 +1363,7 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
|||
for (i = 0; i < cInChars; i++)
|
||||
{
|
||||
/* Joiners get merged preferencially right */
|
||||
if (i > 0 && (pwcInChars[i] == ZWJ || pwcInChars[i] == ZWNJ))
|
||||
if (i > 0 && (pwcInChars[i] == ZWJ || pwcInChars[i] == ZWNJ || pwcInChars[i] == ZWSP))
|
||||
{
|
||||
int j;
|
||||
if (i+1 == cInChars)
|
||||
|
@ -1372,7 +1372,8 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
|||
{
|
||||
for (j = i+1; j < cInChars; j++)
|
||||
{
|
||||
if (pwcInChars[j] != ZWJ && pwcInChars[j] != ZWNJ && pwcInChars[j] != Numeric_space)
|
||||
if (pwcInChars[j] != ZWJ && pwcInChars[j] != ZWNJ
|
||||
&& pwcInChars[j] != ZWSP && pwcInChars[j] != Numeric_space)
|
||||
{
|
||||
scripts[i] = scripts[j];
|
||||
break;
|
||||
|
@ -1497,14 +1498,15 @@ static HRESULT _ItemizeInternal(const WCHAR *pwcInChars, int cInChars,
|
|||
}
|
||||
|
||||
/* Joiners get merged preferencially right */
|
||||
if (i > 0 && (pwcInChars[i] == ZWJ || pwcInChars[i] == ZWNJ))
|
||||
if (i > 0 && (pwcInChars[i] == ZWJ || pwcInChars[i] == ZWNJ || pwcInChars[i] == ZWSP))
|
||||
{
|
||||
int j;
|
||||
if (i+1 == cInChars && levels[i-1] == levels[i])
|
||||
strength[i] = strength[i-1];
|
||||
else
|
||||
for (j = i+1; j < cInChars && levels[i] == levels[j]; j++)
|
||||
if (pwcInChars[j] != ZWJ && pwcInChars[j] != ZWNJ && pwcInChars[j] != Numeric_space)
|
||||
if (pwcInChars[j] != ZWJ && pwcInChars[j] != ZWNJ
|
||||
&& pwcInChars[j] != ZWSP && pwcInChars[j] != Numeric_space)
|
||||
{
|
||||
strength[i] = strength[j];
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue