Signed-off-by: Myah Caron qsniyg@protonmail.com --- v3 doesn't consider a duplicate if the charset is the same. This should fix the test failure under Windows 10 Arabic.
dlls/gdi32/tests/font.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index ad894dfdca..7f9e35ed5f 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -2869,7 +2869,7 @@ static void test_EnumFontFamilies(const char *font_name, INT font_charset) struct enum_font_dataW efdw; LOGFONTA lf; HDC hdc; - int i, ret, ansi_charset, symbol_charset, russian_charset; + int i, ret, ansi_charset, symbol_charset, russian_charset, duplicates;
if (*font_name && !is_truetype_font_installed(font_name)) { @@ -2903,6 +2903,20 @@ static void test_EnumFontFamilies(const char *font_name, INT font_charset) ok(russian_charset > 0 || broken(russian_charset == 0), /* NT4 */ "NULL family should enumerate RUSSIAN_CHARSET\n"); + + duplicates = 0; + for (i = 1; i < efdw.total; i++) { + ret = lstrcmpW(efdw.lf[i - 1].lfFaceName, efdw.lf[i].lfFaceName); + /* Windows 10 Arabic returns "Traditional Arabic" duplicated, but with the same charset (0) */ + if (!ret && efdw.lf[i - 1].lfCharSet != efdw.lf[i].lfCharSet) { + todo_wine ok(ret != 0, "duplicate font faces: (name: '%s', charset %i) (name: '%s', charset %i)\n", + wine_dbgstr_w(efdw.lf[i - 1].lfFaceName), efdw.lf[i - 1].lfCharSet, + wine_dbgstr_w(efdw.lf[i].lfFaceName), efdw.lf[i].lfCharSet); + duplicates++; + } + } + + todo_wine ok(duplicates == 0, "%i duplicate font faces returned\n", duplicates); }
efdw.total = 0; -- 2.27.0