[PATCH 1/2] gdiplus: Don't test font face of DEFAULT_GUI_FONT.
From: Vincent Povirk <vincent(a)codeweavers.com> Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=47872 Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> --- dlls/gdiplus/tests/font.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 9abb80faaf5..7f4b1e876e5 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -808,29 +808,21 @@ static void test_font_metrics(void) static void test_font_substitution(void) { - WCHAR ms_shell_dlg[LF_FACESIZE]; + const WCHAR ms_shell_dlg[] = {'M','S',' ','S','h','e','l','l',' ','D','l','g',0}; char fallback_font[LF_FACESIZE]; HDC hdc; - HFONT hfont; LOGFONTA lf; GpStatus status; GpGraphics *graphics; GpFont *font; GpFontFamily *family; - int ret; hdc = CreateCompatibleDC(0); status = GdipCreateFromHDC(hdc, &graphics); expect(Ok, status); - hfont = GetStockObject(DEFAULT_GUI_FONT); - ok(hfont != 0, "GetStockObject(DEFAULT_GUI_FONT) failed\n"); - - memset(&lf, 0xfe, sizeof(lf)); - ret = GetObjectA(hfont, sizeof(lf), &lf); - ok(ret == sizeof(lf), "GetObject failed\n"); - ok(!lstrcmpA(lf.lfFaceName, "MS Shell Dlg"), "wrong face name %s\n", lf.lfFaceName); - MultiByteToWideChar(CP_ACP, 0, lf.lfFaceName, -1, ms_shell_dlg, LF_FACESIZE); + memset(&lf, 0, sizeof(lf)); + lstrcpyA(lf.lfFaceName, "MS Shell Dlg"); status = GdipCreateFontFromLogfontA(hdc, &lf, &font); expect(Ok, status); -- 2.17.1
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=67784 Your paranoid android. === debiant (32 bit Japanese:Japan report) === gdiplus: font.c:832: Test failed: wrong face name Arial font.c:843: Test failed: wrong face name ^? === debiant (32 bit Chinese:China report) === gdiplus: font.c:832: Test failed: wrong face name Arial
These are existing failures: https://test.winehq.org/data/3ddf3a720f2a342141550c973f10854b573d80ed/linux_... I'm not sure why this results in Arial specifically, but that test machine lacks MS UI Gothic.
On Sun, 22 Mar 2020, Esme (they/them) wrote:
These are existing failures: https://test.winehq.org/data/3ddf3a720f2a342141550c973f10854b573d80ed/linux_...
I'm not sure why this results in Arial specifically, but that test machine lacks MS UI Gothic.
I can reproduce the failure in the ja_JP lcoale on my development machine but not on my Debian 10 TestBot machine. But I don't see which package could make a difference. They all have ttf-mscorefonts-installer but I have not found which package could be providing "MS UI Gothic". Do you know which package provides it on you Linux distribution? Or maybe the font's filename? -- Francois Gouget <fgouget(a)codeweavers.com>
On Sun, Mar 22, 2020, 2:46 PM Esme <vincent(a)codeweavers.com> wrote:
From: Vincent Povirk <vincent(a)codeweavers.com>
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=47872 Signed-off-by: Vincent Povirk <vincent(a)codeweavers.com> --- dlls/gdiplus/tests/font.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c index 9abb80faaf5..7f4b1e876e5 100644 --- a/dlls/gdiplus/tests/font.c +++ b/dlls/gdiplus/tests/font.c @@ -808,29 +808,21 @@ static void test_font_metrics(void)
static void test_font_substitution(void) { - WCHAR ms_shell_dlg[LF_FACESIZE]; + const WCHAR ms_shell_dlg[] = {'M','S',' ','S','h','e','l','l',' ','D','l','g',0};
Especially for tests, is there any reason now to avoid using L””-style literals for wchar strings? If not, you could get rid of ms_shell_dlg completely and substitute L"MS Shell Dlg" for the one remaining place ms_shell_dlg is used.
Hi, While running your changed tests, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=67791 Your paranoid android. === build (build log) === error: corrupt patch at line 43 Task: Patch failed to apply === debiant (build log) === Task: Patch failed to apply === debiant (build log) === Task: Patch failed to apply
participants (5)
-
Esme -
Esme (they/them) -
Francois Gouget -
Jeff Smith -
Marvin