Also fixes test failures on recent Windows versions.
From: Hans Leidekker hans@codeweavers.com
--- dlls/gdi32/tests/font.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 711c9ca4a32..16bfb40392b 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -7573,9 +7573,10 @@ static int CALLBACK get_char_width_proc(const LOGFONTA *lf,
ret = GetCharABCWidthsFloatA(dc, c, c, &abcf); ok(ret, "%s: GetCharABCWidths() failed\n", lf->lfFaceName); - if (GetCharABCWidthsA(dc, c, c, &abc)) - ok((float)abc.abcB == abcf.abcfB, "%s: mismatched widths %d/%.8e\n", - lf->lfFaceName, abc.abcB, abcf.abcfB); + if (!strcmp(lf->lfFaceName, "Noto Color Emoji")) + skip("broken Noto Color Emoji font"); + else if (GetCharABCWidthsA(dc, c, c, &abc)) + ok((float)abc.abcB == abcf.abcfB, "%s: mismatched widths %d/%.8e\n", lf->lfFaceName, abc.abcB, abcf.abcfB);
ReleaseDC(NULL, dc); DeleteObject(font);
From: Hans Leidekker hans@codeweavers.com
--- dlls/gdi32/tests/font.c | 2 +- dlls/win32u/font.c | 12 ------------ 2 files changed, 1 insertion(+), 13 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 16bfb40392b..69000c8ca66 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1186,7 +1186,7 @@ static void test_GetCharABCWidths(void) ok(!ret, "GetCharABCWidthsW should have failed\n");
ret = GetCharABCWidthsW(hdc, 'a', 'a', abc); - ok(!ret, "GetCharABCWidthsW should have failed\n"); + ok(ret || broken(!ret) /* < win10 */, "GetCharABCWidthsW should have succeeded\n");
ret = GetCharABCWidthsFloatW(NULL, 'a', 'a', abcf); ok(!ret, "GetCharABCWidthsFloatW should have failed\n"); diff --git a/dlls/win32u/font.c b/dlls/win32u/font.c index c21d87c1fbc..85acad68ffa 100644 --- a/dlls/win32u/font.c +++ b/dlls/win32u/font.c @@ -6243,7 +6243,6 @@ BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first, UINT last, WCHAR *chars PHYSDEV dev; unsigned int i, count = last; BOOL ret; - TEXTMETRICW tm;
if (!dc) return FALSE;
@@ -6260,17 +6259,6 @@ BOOL WINAPI NtGdiGetCharABCWidthsW( HDC hdc, UINT first, UINT last, WCHAR *chars } else { - if (flags & NTGDI_GETCHARABCWIDTHS_INT) - { - /* unlike float variant, this one is supposed to fail on non-scalable fonts */ - dev = GET_DC_PHYSDEV( dc, pGetTextMetrics ); - if (!dev->funcs->pGetTextMetrics( dev, &tm ) || !(tm.tmPitchAndFamily & TMPF_VECTOR)) - { - release_dc_ptr( dc ); - return FALSE; - } - } - if (!chars) count = last - first + 1; dev = GET_DC_PHYSDEV( dc, pGetCharABCWidths ); ret = dev->funcs->pGetCharABCWidths( dev, first, count, chars, buffer );
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=139161
Your paranoid android.
=== debian11b (64 bit WoW report) ===
dinput: device8.c:2238: Test failed: 0x500: got key_state[0] 0
This merge request was approved by Huw Davies.