dwrite: Store locale name range attribute in lower case.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2016-01-15 00:24:24 +03:00 committed by Alexandre Julliard
parent c5fce83f3d
commit 0874c7be15
2 changed files with 4 additions and 4 deletions

View File

@ -2158,8 +2158,10 @@ static BOOL set_layout_range_attrval(struct layout_range_header *h, enum layout_
break;
case LAYOUT_RANGE_ATTR_LOCALE:
changed = strcmpiW(dest->locale, value->u.locale) != 0;
if (changed)
if (changed) {
strcpyW(dest->locale, value->u.locale);
strlwrW(dest->locale);
}
break;
case LAYOUT_RANGE_ATTR_FONTFAMILY:
changed = strcmpW(dest->fontfamily, value->u.fontfamily) != 0;

View File

@ -2097,7 +2097,6 @@ if (0) /* crashes on native */
range.length = 0;
hr = IDWriteTextLayout_GetLocaleName(layout, 0, buffW, sizeof(buffW)/sizeof(WCHAR), &range);
ok(hr == S_OK, "got 0x%08x\n", hr);
todo_wine
ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW));
ok((range.startPosition == 0 && range.length == ~0u) ||
broken(range.startPosition == 0 && range.length == 4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length);
@ -2107,7 +2106,6 @@ todo_wine
range.length = 0;
hr = IDWriteTextLayout_GetLocaleName(layout, 100, buffW, sizeof(buffW)/sizeof(WCHAR), &range);
ok(hr == S_OK, "got 0x%08x\n", hr);
todo_wine
ok(!lstrcmpW(buffW, enusW), "got %s\n", wine_dbgstr_w(buffW));
ok((range.startPosition == 0 && range.length == ~0u) ||
broken(range.startPosition == 4 && range.length == ~0u-4) /* vista/win7 */, "got %u,%u\n", range.startPosition, range.length);
@ -4418,7 +4416,7 @@ todo_wine
flush_sequence(sequences, RENDERER_ID);
hr = IDWriteTextLayout_Draw(layout, NULL, &testrenderer, 0.0f, 0.0f);
ok(hr == S_OK, "got 0x%08x\n", hr);
ok_sequence(sequences, RENDERER_ID, drawunderline3_seq, "draw underline test 2", TRUE);
ok_sequence(sequences, RENDERER_ID, drawunderline3_seq, "draw underline test 2", FALSE);
IDWriteTextLayout_Release(layout);