[PATCH 1/2] gdiplus: Don't test font face of DEFAULT_GUI_FONT.
Esme
vincent at codeweavers.com
Sun Mar 22 14:46:16 CDT 2020
From: Vincent Povirk <vincent at codeweavers.com>
Wine-bug: https://bugs.winehq.org/show_bug.cgi?id=47872
Signed-off-by: Vincent Povirk <vincent at 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
More information about the wine-devel
mailing list