Commit c17a8f32 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

gdi32: Fix ABC width calculations when using vertical font.

parent 34c4687f
......@@ -7050,6 +7050,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
pFT_Vector_Transform(&vec, &transMat);
origin_x = (vec.x + left) & -64;
origin_y = (vec.y + top + 63) & -64;
lsb -= metrics.horiBearingY;
}
else
{
......@@ -7074,7 +7075,7 @@ static DWORD get_glyph_outline(GdiFont *incoming_font, UINT glyph, UINT format,
else abc->abcA = -((pFT_Vector_Length(&vec) + 63) >> 6);
/* We use lsb again to avoid rounding errors */
vec.x = lsb + metrics.width;
vec.x = lsb + (tategaki ? metrics.height : metrics.width);
vec.y = 0;
pFT_Vector_Transform(&vec, &transMatUnrotated);
abc->abcB = ((pFT_Vector_Length(&vec) + 63) >> 6) - abc->abcA;
......
......@@ -5959,9 +5959,9 @@ static void check_vertical_metrics(const char *face)
ok(ret != GDI_ERROR, "GetGlyphOutlineW failed\n");
ret = GetCharABCWidthsW(hdc, code, code, &vabc);
ok(ret, "GetCharABCWidthsW failed\n");
todo_wine ok(vabc.abcA == vgm.gmptGlyphOrigin.x, "expected %d, got %d\n",
ok(vabc.abcA == vgm.gmptGlyphOrigin.x, "expected %d, got %d\n",
vabc.abcA, vgm.gmptGlyphOrigin.x);
todo_wine ok(vabc.abcB == vgm.gmBlackBoxX, "expected %d, got %d\n",
ok(vabc.abcB == vgm.gmBlackBoxX, "expected %d, got %d\n",
vabc.abcB, vgm.gmBlackBoxX);
ok(vabc.abcA + vabc.abcB + vabc.abcC == vgm.gmCellIncX,
"expected %d, got %d\n",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment