Commit d8fa0ff1 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

dwrite: Add some mappings for Tahoma in the system fallback.

parent 26e717c5
......@@ -218,6 +218,10 @@ static const struct fallback_description
}
system_fallback_config[] =
{
/* Latin, Combining Diacritical Marks */
{ "0000-007F, 0080-00FF, 0100-017F, 0180-024F, "
"0250-02AF, 02B0-02FF, 0300-036F", L"Tahoma" },
{ "3000-30FF, 31F0-31FF, 4E00-9FFF", L"Meiryo" },
};
......
......@@ -725,7 +725,7 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
goto fatal;
}
if (!mapped_length)
if (!font)
{
if (FAILED(create_matching_font(range->collection, range->fontfamily, range->weight, range->style,
range->stretch, &IID_IDWriteFont3, (void **)&font)))
......
......@@ -4640,14 +4640,12 @@ static void test_MapCharacters(void)
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(mappedlength == 1, "got %u\n", mappedlength);
ok(scale == 1.0f, "got %f\n", scale);
todo_wine
ok(font != NULL, "got %p\n", font);
if (font) {
IDWriteFont_Release(font);
}
if (font)
IDWriteFont_Release(font);
/* same Latin text, full length */
g_source = L"abc";
mappedlength = 0;
......@@ -4656,15 +4654,13 @@ if (font) {
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(mappedlength == 3, "got %u\n", mappedlength);
ok(scale == 1.0f, "got %f\n", scale);
todo_wine
ok(font != NULL, "got %p\n", font);
if (font) {
IDWriteFont_Release(font);
}
if (font)
IDWriteFont_Release(font);
/* string 'a\x3058b' */
g_source = str2W;
mappedlength = 0;
......@@ -4673,14 +4669,12 @@ if (font) {
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
todo_wine
ok(mappedlength == 1, "got %u\n", mappedlength);
ok(scale == 1.0f, "got %f\n", scale);
todo_wine
ok(font != NULL, "got %p\n", font);
if (font) {
IDWriteFont_Release(font);
}
if (font)
IDWriteFont_Release(font);
g_source = str2W;
mappedlength = 0;
scale = 0.0f;
......
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