From: Dmitry Timoshkov Subject: [PATCH 2/2] dwrite: Add Segoe UI Symbol fallback ranges. (Resend) Message-Id: <20220125115633.78434fc5a19724efd9023b64@baikal.ru> Date: Tue, 25 Jan 2022 11:56:33 +0300 Signed-off-by: Dmitry Timoshkov --- dlls/dwrite/analyzer.c | 8 ++++++++ dlls/dwrite/tests/layout.c | 5 ++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c index 13ccf8e4434..a169b8ef860 100644 --- a/dlls/dwrite/analyzer.c +++ b/dlls/dwrite/analyzer.c @@ -220,6 +220,13 @@ static const DWRITE_UNICODE_RANGE cjk_ranges[] = { 0x4e00, 0x9fff }, /* CJK Unified Ideographs */ }; +static const WCHAR *SegoeUI_Symbol_families[] = { L"Segoe UI Symbol" }; + +static const DWRITE_UNICODE_RANGE SegoeUI_Symbol_ranges[] = +{ + { 0x2196, 0x2bef }, +}; + struct fallback_mapping { DWRITE_UNICODE_RANGE *ranges; UINT32 ranges_count; @@ -236,6 +243,7 @@ static const struct fallback_mapping fontfallback_neutral_data[] = { (WCHAR **)families, ARRAY_SIZE(families) } MAPPING_RANGE(cjk_ranges, cjk_families), + MAPPING_RANGE(SegoeUI_Symbol_ranges, SegoeUI_Symbol_families), #undef MAPPING_RANGE }; diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c index c242155cce3..7bc53834ea3 100644 --- a/dlls/dwrite/tests/layout.c +++ b/dlls/dwrite/tests/layout.c @@ -6604,19 +6604,18 @@ todo_wine { hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, collection, families[i], DWRITE_FONT_WEIGHT_NORMAL, DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale); -todo_wine_if(families[i] == NULL) ok(hr == S_OK, "%u: %s - got %#x\n", i, wine_dbgstr_w(families[i]), hr); if (hr != S_OK) continue; ok(mappedlength == 1, "got %u\n", mappedlength); ok(scale == 1.0f, "got %f\n", scale); get_font_name(font, name, ARRAY_SIZE(name)); -todo_wine +todo_wine_if(families[i] != NULL) ok(!wcscmp(name, L"Segoe UI Symbol"), "got %s\n", wine_dbgstr_w(name)); hr = IDWriteFont_HasCharacter(font, 0x25d4, &exists); ok(hr == S_OK, "got %#x\n", hr); -todo_wine +todo_wine_if(families[i] != NULL) ok(exists, "%s should have character 0x25d4\n", wine_dbgstr_w(name)); IDWriteFont_Release(font); -- 2.34.1