Commit 0874c7be authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Store locale name range attribute in lower case.

parent c5fce83f
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment