From: Brendan McGrath bmcgrath@codeweavers.com
Also fix the reported width on existing tests --- dlls/gdi32/tests/font.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 76ea0ac7de7..f8c7833fef0 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -1313,24 +1313,30 @@ static void test_GetCharABCWidths(void) } for (j = 1; j <= 80; j++) { - GLYPHMETRICS gm; + GLYPHMETRICS gm, gm_bitmap;
lf.lfWidth = j; hfont = CreateFontIndirectA(&lf); hfont = SelectObject(hdc, hfont);
nb = GetGlyphOutlineA(hdc, code, GGO_METRICS, &gm, 0, NULL, &mat); - ok(nb, "GetGlyphOutlineA should have succeeded at width %d\n", i); + ok(nb, "GetGlyphOutlineA should have succeeded at width %d\n", j); + + nb = GetGlyphOutlineA(hdc, code, GGO_BITMAP, &gm_bitmap, 0, NULL, &mat); + ok(nb, "GetGlyphOutlineA should have succeeded with bitmap at width %d\n", j);
ret = GetCharABCWidthsA(hdc, code, code, abc); - ok(ret, "GetCharABCWidthsA should have succeeded at width %d\n", i); + ok(ret, "GetCharABCWidthsA should have succeeded at width %d\n", j);
ok(abc[0].abcA == gm.gmptGlyphOrigin.x, "abcA(%d) and gmptGlyphOrigin.x(%ld) values are different at width %d\n", - abc[0].abcA, gm.gmptGlyphOrigin.x, i); + abc[0].abcA, gm.gmptGlyphOrigin.x, j); ok(abc[0].abcB == gm.gmBlackBoxX, "abcB(%d) and gmBlackBoxX(%d) values are different at width %d\n", - abc[0].abcB, gm.gmBlackBoxX, i); + abc[0].abcB, gm.gmBlackBoxX, j); + todo_wine_if(i == 1 && j == 7) ok(abc[0].abcA + abc[0].abcB + abc[0].abcC == gm_bitmap.gmCellIncX, + "sum of abc value (%d, %d, %d) is different to gmCellIncX of bitmap (%d) at width %d\n", + abc[0].abcA, abc[0].abcB, abc[0].abcC, gm_bitmap.gmCellIncX, j); DeleteObject(SelectObject(hdc, hfont)); } }