gdi32: Fix the B spacing value of empty glyph.
This commit is contained in:
parent
af759e30c9
commit
042b39a82b
|
@ -6525,7 +6525,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
|
||||||
lpgm->gmptGlyphOrigin.x = origin_x >> 6;
|
lpgm->gmptGlyphOrigin.x = origin_x >> 6;
|
||||||
lpgm->gmptGlyphOrigin.y = origin_y >> 6;
|
lpgm->gmptGlyphOrigin.y = origin_y >> 6;
|
||||||
abc->abcA = left >> 6;
|
abc->abcA = left >> 6;
|
||||||
abc->abcB = width;
|
abc->abcB = lpgm->gmBlackBoxX;
|
||||||
abc->abcC = adv - abc->abcA - abc->abcB;
|
abc->abcC = adv - abc->abcA - abc->abcB;
|
||||||
|
|
||||||
TRACE("%u,%u,%s,%d,%d\n", lpgm->gmBlackBoxX, lpgm->gmBlackBoxY,
|
TRACE("%u,%u,%s,%d,%d\n", lpgm->gmBlackBoxX, lpgm->gmBlackBoxY,
|
||||||
|
|
|
@ -1298,11 +1298,22 @@ static void test_GetCharABCWidths(void)
|
||||||
DeleteObject(hfont);
|
DeleteObject(hfont);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReleaseDC(NULL, hdc);
|
|
||||||
|
|
||||||
memset(&lf, 0, sizeof(lf));
|
memset(&lf, 0, sizeof(lf));
|
||||||
strcpy(lf.lfFaceName, "Tahoma");
|
strcpy(lf.lfFaceName, "Tahoma");
|
||||||
lf.lfHeight = 20;
|
lf.lfHeight = 20;
|
||||||
|
hfont = CreateFontIndirectA(&lf);
|
||||||
|
|
||||||
|
/* test empty glyph's metrics */
|
||||||
|
hfont = SelectObject(hdc, hfont);
|
||||||
|
ret = pGetCharABCWidthsFloatW(hdc, ' ', ' ', abcf);
|
||||||
|
ok(ret, "GetCharABCWidthsFloatW should have succeeded\n");
|
||||||
|
ok(abcf[0].abcfB == 1.0, "got %f\n", abcf[0].abcfB);
|
||||||
|
ret = pGetCharABCWidthsW(hdc, ' ', ' ', abcw);
|
||||||
|
ok(ret, "GetCharABCWidthsW should have succeeded\n");
|
||||||
|
ok(abcw[0].abcB == 1, "got %u\n", abcw[0].abcB);
|
||||||
|
|
||||||
|
DeleteObject(SelectObject(hdc, hfont));
|
||||||
|
ReleaseDC(NULL, hdc);
|
||||||
|
|
||||||
trace("ABC sign test for a variety of transforms:\n");
|
trace("ABC sign test for a variety of transforms:\n");
|
||||||
hfont = CreateFontIndirectA(&lf);
|
hfont = CreateFontIndirectA(&lf);
|
||||||
|
@ -1318,7 +1329,7 @@ static void test_GetCharABCWidths(void)
|
||||||
ret = pGetCharABCWidthsI(hdc, 0, 1, glyphs, abc);
|
ret = pGetCharABCWidthsI(hdc, 0, 1, glyphs, abc);
|
||||||
ok(ret, "GetCharABCWidthsI should have succeeded\n");
|
ok(ret, "GetCharABCWidthsI should have succeeded\n");
|
||||||
ret = pGetCharABCWidthsW(hdc, 'i', 'i', abcw);
|
ret = pGetCharABCWidthsW(hdc, 'i', 'i', abcw);
|
||||||
ok(ret, "GetCharABCWidthsI should have succeeded\n");
|
ok(ret, "GetCharABCWidthsW should have succeeded\n");
|
||||||
ret = pGetCharABCWidthsFloatW(hdc, 'i', 'i', abcf);
|
ret = pGetCharABCWidthsFloatW(hdc, 'i', 'i', abcf);
|
||||||
ok(ret, "GetCharABCWidthsFloatW should have succeeded\n");
|
ok(ret, "GetCharABCWidthsFloatW should have succeeded\n");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue