[PATCH v3 3/4] dwrite: Add Segoe UI Symbol fallback range for the Geometric Shapes unicode block.

Dmitry Timoshkov dmitry at baikal.ru
Mon Apr 4 10:10:20 CDT 2022


As discussed on wine-devel with just Geometric Shapes unicode block.

Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
---
 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 7ffcfa8070c..0087c126322 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[] =
+{
+    { 0x25a0, 0x25ff }, /* Geometric Shapes */
+};
+
 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 c36f370d7da..756c8993373 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -6619,19 +6619,18 @@ static void test_SegoeUI_Symbol(void)
     {
         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.35.1




More information about the wine-devel mailing list