From: Myah Caron Subject: [PATCH 1/2] gdi32/tests: Add single charset test for EnumFontFamilies. Message-Id: Date: Fri, 24 Jul 2020 12:31:11 +0000 Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=47726 Signed-off-by: Myah Caron --- dlls/gdi32/tests/font.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index ad894dfdca..9949abdfe4 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -257,7 +257,7 @@ static void test_logfont(void) memset(&lf, 'A', sizeof(lf)); hfont = CreateFontIndirectA(&lf); ok(hfont != 0, "CreateFontIndirectA with strange LOGFONT failed\n"); - + lf.lfFaceName[LF_FACESIZE - 1] = 0; check_font("AAA...", &lf, hfont); DeleteObject(hfont); @@ -2903,6 +2903,13 @@ 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"); + + /* EnumFontFamilies should only enumerate a single charset (the first one found) for a font face */ + for (i = 1; i < efdw.total; i++) { + ret = lstrcmpW(efdw.lf[i - 1].lfFaceName, efdw.lf[i].lfFaceName); + todo_wine ok(ret != 0, "old font family (%s) == new font family(%s)\n", + wine_dbgstr_w(efdw.lf[i - 1].lfFaceName), wine_dbgstr_w(efdw.lf[i].lfFaceName)); + } } efdw.total = 0; -- 2.27.0