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

gdi32: Fix text metrics in synthetic bold bitmap fonts.

parent b4a10d17
......@@ -7523,6 +7523,9 @@ static BOOL get_bitmap_text_metrics(GdiFont *font)
TM.tmPitchAndFamily = FT_IS_FIXED_WIDTH(ft_face) ? 0 : TMPF_FIXED_PITCH;
TM.tmCharSet = font->charset;
}
if(font->fake_bold)
TM.tmWeight = FW_BOLD;
#undef TM
return TRUE;
......@@ -7552,10 +7555,12 @@ static void scale_font_metrics(const GdiFont *font, LPTEXTMETRICW ptm)
SCALE_Y(ptm->tmDescent);
SCALE_Y(ptm->tmInternalLeading);
SCALE_Y(ptm->tmExternalLeading);
SCALE_Y(ptm->tmOverhang);
if(FT_IS_SCALABLE(font->ft_face) && font->fake_bold)
SCALE_X(ptm->tmOverhang);
if(font->fake_bold)
{
if(!FT_IS_SCALABLE(font->ft_face))
ptm->tmOverhang++;
ptm->tmAveCharWidth++;
ptm->tmMaxCharWidth++;
}
......
......@@ -6583,15 +6583,12 @@ static void test_fake_bold_font(void)
"expected %d, got %d\n", data[i].tm.tmAscent, data[i+1].tm.tmAscent);
ok(data[i].tm.tmDescent == data[i+1].tm.tmDescent,
"expected %d, got %d\n", data[i].tm.tmDescent, data[i+1].tm.tmDescent);
todo_wine
ok(data[i+1].tm.tmAveCharWidth - data[i].tm.tmAveCharWidth == diff,
"expected %d, got %d\n", diff, data[i+1].tm.tmAveCharWidth - data[i].tm.tmAveCharWidth);
todo_wine
ok(data[i+1].tm.tmMaxCharWidth - data[i].tm.tmMaxCharWidth == diff,
"expected %d, got %d\n", diff, data[i+1].tm.tmMaxCharWidth - data[i].tm.tmMaxCharWidth);
ok(data[i].tm.tmOverhang == 0,
"expected 0, got %d\n", data[i].tm.tmOverhang);
todo_wine
ok(data[i+1].tm.tmOverhang == 1,
"expected 1, got %d\n", data[i+1].tm.tmOverhang);
ok(data[i].w + 1 == data[i+1].w,
......
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