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 );