You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against 842452d4e79b20c42d2b7e279063b2feabeb31de.
This commit is contained in:
committed by
Alistair Leslie-Hughes
parent
776c2a6800
commit
87f607719e
@@ -1,4 +1,4 @@
|
||||
From 8c7187f5501fff70df81612dfbdd084e67605189 Mon Sep 17 00:00:00 2001
|
||||
From bf4cc6cfca946ff719763bb7be25fe268577f0d3 Mon Sep 17 00:00:00 2001
|
||||
From: Lucian Poston <lucianposton@pm.me>
|
||||
Date: Mon, 21 May 2018 18:13:00 -0700
|
||||
Subject: [PATCH] dwrite: Use font fallback when mapping characters
|
||||
@@ -7,11 +7,11 @@ Signed-off-by: Lucian Poston <lucianposton@pm.me>
|
||||
---
|
||||
dlls/dwrite/analyzer.c | 77 +++++++++++++++++++++++++++++---------
|
||||
dlls/dwrite/layout.c | 6 +++
|
||||
dlls/dwrite/tests/layout.c | 54 +++++---------------------
|
||||
3 files changed, 74 insertions(+), 63 deletions(-)
|
||||
dlls/dwrite/tests/layout.c | 54 ++++----------------------
|
||||
3 files changed, 73 insertions(+), 64 deletions(-)
|
||||
|
||||
diff --git a/dlls/dwrite/analyzer.c b/dlls/dwrite/analyzer.c
|
||||
index 13ccf8e4434..c535b0cf49d 100644
|
||||
index 7ffcfa8070c..aab309c2a8c 100644
|
||||
--- a/dlls/dwrite/analyzer.c
|
||||
+++ b/dlls/dwrite/analyzer.c
|
||||
@@ -2094,6 +2094,7 @@ static HRESULT fallback_get_fallback_font(struct dwrite_fontfallback *fallback,
|
||||
@@ -124,7 +124,7 @@ index 13ccf8e4434..c535b0cf49d 100644
|
||||
free(buff);
|
||||
return hr;
|
||||
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c
|
||||
index d4aa49c6a6c..cda50c20777 100644
|
||||
index ba80c3f70e8..c7845f9b675 100644
|
||||
--- a/dlls/dwrite/layout.c
|
||||
+++ b/dlls/dwrite/layout.c
|
||||
@@ -725,6 +725,12 @@ static HRESULT layout_resolve_fonts(struct dwrite_textlayout *layout)
|
||||
@@ -141,10 +141,10 @@ index d4aa49c6a6c..cda50c20777 100644
|
||||
IDWriteFont_Release(font);
|
||||
if (FAILED(hr)) {
|
||||
diff --git a/dlls/dwrite/tests/layout.c b/dlls/dwrite/tests/layout.c
|
||||
index 096fc554253..b622aeb4239 100644
|
||||
index 3efedd3df95..07687c76c60 100644
|
||||
--- a/dlls/dwrite/tests/layout.c
|
||||
+++ b/dlls/dwrite/tests/layout.c
|
||||
@@ -3368,35 +3368,23 @@ static void test_GetMetrics(void)
|
||||
@@ -3366,35 +3366,23 @@ static void test_GetMetrics(void)
|
||||
|
||||
count = 0;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
@@ -180,45 +180,48 @@ index 096fc554253..b622aeb4239 100644
|
||||
ok(metrics.lineCount == 1, "got %u\n", metrics.lineCount);
|
||||
|
||||
IDWriteTextLayout_Release(layout);
|
||||
@@ -4690,12 +4678,9 @@ static void test_MapCharacters(void)
|
||||
@@ -4688,16 +4676,12 @@ static void test_MapCharacters(void)
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 1, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
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) {
|
||||
-if (font) {
|
||||
IDWriteFont_Release(font);
|
||||
@@ -4707,16 +4692,13 @@ if (font) {
|
||||
-}
|
||||
+
|
||||
/* same Latin text, full length */
|
||||
g_source = L"abc";
|
||||
mappedlength = 0;
|
||||
@@ -4705,16 +4689,12 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
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);
|
||||
IDWriteFont_Release(font);
|
||||
-}
|
||||
+ if (font) {
|
||||
+ IDWriteFont_Release(font);
|
||||
+ }
|
||||
+
|
||||
/* string 'a\x3058b' */
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
@@ -4724,32 +4706,24 @@ if (font) {
|
||||
@@ -4722,32 +4702,24 @@ if (font) {
|
||||
font = NULL;
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 0, 3, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
@@ -235,7 +238,7 @@ index 096fc554253..b622aeb4239 100644
|
||||
hr = IDWriteFontFallback_MapCharacters(fallback, &analysissource, 1, 2, NULL, NULL, DWRITE_FONT_WEIGHT_NORMAL,
|
||||
DWRITE_FONT_STYLE_NORMAL, DWRITE_FONT_STRETCH_NORMAL, &mappedlength, &font, &scale);
|
||||
-todo_wine {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
-}
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
@@ -248,7 +251,7 @@ index 096fc554253..b622aeb4239 100644
|
||||
/* Try with explicit collection, Tahoma will be forced. */
|
||||
/* 1. Latin part */
|
||||
g_source = str2W;
|
||||
@@ -4772,7 +4746,10 @@ if (font) {
|
||||
@@ -4770,7 +4742,10 @@ if (font) {
|
||||
IDWriteLocalizedStrings_Release(strings);
|
||||
IDWriteFont_Release(font);
|
||||
|
||||
@@ -260,15 +263,15 @@ index 096fc554253..b622aeb4239 100644
|
||||
g_source = str2W;
|
||||
mappedlength = 0;
|
||||
scale = 0.0f;
|
||||
@@ -4782,7 +4759,6 @@ if (font) {
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
@@ -4780,7 +4755,6 @@ if (font) {
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
ok(mappedlength == 1, "got %u\n", mappedlength);
|
||||
ok(scale == 1.0f, "got %f\n", scale);
|
||||
- ok(font != NULL, "got %p\n", font);
|
||||
|
||||
exists = FALSE;
|
||||
hr = IDWriteFont_GetInformationalStrings(font, DWRITE_INFORMATIONAL_STRING_WIN32_FAMILY_NAMES, &strings, &exists);
|
||||
@@ -6669,34 +6645,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
@@ -6667,34 +6641,22 @@ static void test_GetMetrics_with_custom_fontcollection(void)
|
||||
ok(hr == S_OK, "got 0x%08x\n", hr);
|
||||
count = 9999;
|
||||
hr = IDWriteTextLayout_GetClusterMetrics(layout, clusters, 4, &count);
|
||||
@@ -304,5 +307,5 @@ index 096fc554253..b622aeb4239 100644
|
||||
IDWriteTextLayout_Release(layout);
|
||||
|
||||
--
|
||||
2.34.1
|
||||
2.35.1
|
||||
|
||||
|
Reference in New Issue
Block a user