gdi32: Return fake BBox when requesting empty glyph metrics.

oldstable
Akihiro Sagawa 2013-10-01 22:03:18 +09:00 committed by Alexandre Julliard
parent b138c36c11
commit db86409db6
2 changed files with 10 additions and 18 deletions

View File

@ -6520,8 +6520,8 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
width = (right - left) >> 6;
height = (top - bottom) >> 6;
lpgm->gmBlackBoxX = width;
lpgm->gmBlackBoxY = height;
lpgm->gmBlackBoxX = width ? width : 1;
lpgm->gmBlackBoxY = height ? height : 1;
lpgm->gmptGlyphOrigin.x = origin_x >> 6;
lpgm->gmptGlyphOrigin.y = origin_y >> 6;
abc->abcA = left >> 6;

View File

@ -4120,10 +4120,8 @@ static void test_GetGlyphOutline(void)
ok(ret != GDI_ERROR, "%2d:GetGlyphOutlineW should succeed, got %d\n", fmt[i], ret);
else
ok(ret == 0, "%2d:GetGlyphOutlineW should return 0, got %d\n", fmt[i], ret);
todo_wine {
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
memset(&gm, 0xab, sizeof(gm));
@ -4135,10 +4133,8 @@ static void test_GetGlyphOutline(void)
ok(ret != GDI_ERROR, "%2d:GetGlyphOutlineW should succeed, got %d\n", fmt[i], ret);
else
ok(ret == 0, "%2d:GetGlyphOutlineW should return 0, got %d\n", fmt[i], ret);
todo_wine {
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
memset(&gm, 0xab, sizeof(gm));
@ -4150,10 +4146,8 @@ static void test_GetGlyphOutline(void)
ok(ret != GDI_ERROR, "%2d:GetGlyphOutlineW should succeed, got %d\n", fmt[i], ret);
else
ok(ret == 0, "%2d:GetGlyphOutlineW should return 0, got %d\n", fmt[i], ret);
todo_wine {
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
memset(&gm, 0xab, sizeof(gm));
@ -4163,10 +4157,8 @@ static void test_GetGlyphOutline(void)
{
if (fmt[i] == GGO_METRICS) {
ok(ret != GDI_ERROR, "%2d:GetGlyphOutlineW should succeed, got %d\n", fmt[i], ret);
todo_wine {
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
ok(gm.gmBlackBoxX == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxX);
ok(gm.gmBlackBoxY == 1, "%2d:expected 1, got %u\n", fmt[i], gm.gmBlackBoxY);
}
else
ok(ret == GDI_ERROR, "%2d:GetGlyphOutlineW should return GDI_ERROR, got %d\n", fmt[i], ret);