Signed-off-by: Shawn M. Chapla schapla@codeweavers.com ---
This patch isn't strictly necessary, but it may clear up some potential for confusion in cases where test metafiles are being saved/loaded in a prefix where Times New Roman is not installed.
dlls/gdiplus/tests/metafile.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/dlls/gdiplus/tests/metafile.c b/dlls/gdiplus/tests/metafile.c index 371a3c21b4..d2912f40ea 100644 --- a/dlls/gdiplus/tests/metafile.c +++ b/dlls/gdiplus/tests/metafile.c @@ -2977,6 +2977,8 @@ static void test_drawdriverstring(void) GpStatus stat; GpGraphics *graphics; GpFont *solidfont, *hatchfont; + GpFontFamily *family; + WCHAR familyname[LF_FACESIZE]; GpBrush *solidbrush, *hatchbrush; HDC hdc; GpMatrix *matrix; @@ -2990,12 +2992,17 @@ static void test_drawdriverstring(void) logfont.lfCharSet = DEFAULT_CHARSET;
stat = GdipCreateFontFromLogfontA(hdc, &logfont, &solidfont); - if (stat == NotTrueTypeFont || stat == FileNotFound) - { - DeleteDC(hdc); - skip("Times New Roman not installed.\n"); - return; - } + expect(Ok, stat); + + stat = GdipGetFamily(solidfont, &family); + expect(Ok, stat); + + familyname[0] = 0; + stat = GdipGetFamilyName(family, familyname, LANG_NEUTRAL); + expect(Ok, stat); + + if (lstrcmpiW(familyname, L"Times New Roman")) + trace("Times New Roman is not installed. save/load may not yield expected results.\n");
stat = GdipCloneFont(solidfont, &hatchfont); expect(Ok, stat); @@ -3031,7 +3038,7 @@ static void test_drawdriverstring(void) DriverStringOptionsCmapLookup|DriverStringOptionsRealizedAdvance, matrix); expect(Ok, stat);
- stat = GdipDeleteGraphics(graphics); + GdipDeleteGraphics(graphics); graphics = NULL;
check_metafile(metafile, drawdriverstring_records, "drawdriverstring metafile", dst_points,
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=75491
Your paranoid android.
=== build (build log) ===
error: patch failed: dlls/gdiplus/tests/metafile.c:3031 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/tests/metafile.c:3031 Task: Patch failed to apply
=== debiant (build log) ===
error: patch failed: dlls/gdiplus/tests/metafile.c:3031 Task: Patch failed to apply
I think this will just add more confusion, if playback is fixed to handle missing fonts.
On Thu, Jul 16, 2020 at 08:34:25PM -0500, Esme Povirk (they/them) wrote:
I think this will just add more confusion, if playback is fixed to handle missing fonts.
Very good point. It's probably best to just disregard this patch.