mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
gdi32: Fix ABC width calculations when using vertical font.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Huw Davies <huw@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
34c4687f25
commit
c17a8f32c4
2 changed files with 4 additions and 3 deletions
|
@ -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",
|
||||
|
|
Loading…
Reference in a new issue