Nikolay Sivov : dwrite: Add some mappings for Tahoma in the system fallback.
Alexandre Julliard
julliard at winehq.org
Fri Jul 22 15:38:23 CDT 2022
Module: wine
Branch: master
Commit: d8fa0ff14867174cde95829c3145be592d5ef2f0
URL: https://gitlab.winehq.org/wine/wine/-/commit/d8fa0ff14867174cde95829c3145be592d5ef2f0
Author: Nikolay Sivov <nsivov at codeweavers.com>
Date: Fri Jul 22 12:54:16 2022 +0300
dwrite: Add some mappings for Tahoma in the system fallback.
Signed-off-by: Nikolay Sivov <nsivov at codeweavers.com>
---
dlls/dwrite/analyzer.c | 4 ++++
dlls/dwrite/layout.c | 2 +-
dlls/dwrite/tests/layout.c | 24 +++++++++---------------
3 files changed, 14 insertions(+), 16 deletions(-)
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
index f0295eed48c..595d8806159 100644
--- a/dlls/dwrite/analyzer.c
+++ b/dlls/dwrite/analyzer.c
@@ -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" },
};
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
index 447b3d5176b..2260e204c3f 100644
--- a/dlls/dwrite/layout.c
+++ b/dlls/dwrite/layout.c
@@ -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)))
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
index 9d6dca91b39..5e7e1b16d27 100644
--- a/dlls/dwrite/tests/layout.c
+++ b/dlls/dwrite/tests/layout.c
@@ -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;
More information about the wine-cvs
mailing list