Vincent Povirk : gdiplus/tests: Don't test font face of DEFAULT_GUI_FONT.
Alexandre Julliard
julliard at winehq.org
Mon Mar 23 15:47:10 CDT 2020
Module: wine
Branch: master
Commit: 861811254f52f278d9cf7eeab5fc4b167d65bd4e
URL: https://source.winehq.org/git/wine.git/?a=commit;h=861811254f52f278d9cf7eeab5fc4b167d65bd4e
Author: Vincent Povirk <vincent at codeweavers.com>
Date: Sun Mar 22 14:46:16 2020 -0500
gdiplus/tests: Don't test font face of DEFAULT_GUI_FONT.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47872
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdiplus/tests/font.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/dlls/gdiplus/tests/font.c b/dlls/gdiplus/tests/font.c
index 9abb80faaf..a4a96970af 100644
--- a/dlls/gdiplus/tests/font.c
+++ b/dlls/gdiplus/tests/font.c
@@ -808,29 +808,20 @@ static void test_font_metrics(void)
static void test_font_substitution(void)
{
- WCHAR ms_shell_dlg[LF_FACESIZE];
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);
@@ -841,7 +832,7 @@ static void test_font_substitution(void)
!lstrcmpA(lf.lfFaceName, "Tahoma"), "wrong face name %s\n", lf.lfFaceName);
GdipDeleteFont(font);
- status = GdipCreateFontFamilyFromName(ms_shell_dlg, NULL, &family);
+ status = GdipCreateFontFamilyFromName(L"MS Shell Dlg", NULL, &family);
expect(Ok, status);
status = GdipCreateFont(family, 12, FontStyleRegular, UnitPoint, &font);
expect(Ok, status);
More information about the wine-cvs
mailing list