[PATCH] dwrite/tests: Do not assume that fonts have a en-us name.

Giovanni Mascellani gmascellani at codeweavers.com
Wed Mar 3 05:38:50 CST 2021


Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
 dlls/dwrite/tests/analyzer.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/dlls/dwrite/tests/analyzer.c b/dlls/dwrite/tests/analyzer.c
index 6dd251270c7..0294bbfb719 100644
--- a/dlls/dwrite/tests/analyzer.c
+++ b/dlls/dwrite/tests/analyzer.c
@@ -1500,7 +1500,10 @@ static void get_enus_string(IDWriteLocalizedStrings *strings, WCHAR *buff, unsig
 
     hr = IDWriteLocalizedStrings_FindLocaleName(strings, L"en-us", &index, &exists);
     ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
-    ok(exists, "Failed to find locale name %d.\n", exists);
+
+    /* Not all fonts have an en-us name! */
+    if (!exists)
+        index = 0;
 
     hr = IDWriteLocalizedStrings_GetString(strings, index, buff, size);
     ok(hr == S_OK, "Failed to get name string, hr %#x.\n", hr);
-- 
2.30.1




More information about the wine-devel mailing list