gdi32: Fix synthetic bold outline text metrics.

Without this fix, synthetic tmAveCharWidth value unintentionally affects
SCALE_X calculation.

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:
Akihiro Sagawa 2018-02-18 21:33:57 +09:00 committed by Alexandre Julliard
parent 1bd9cb3471
commit 68f9fb556d

View file

@ -7554,6 +7554,11 @@ static void scale_font_metrics(const GdiFont *font, LPTEXTMETRICW ptm)
SCALE_Y(ptm->tmExternalLeading);
SCALE_Y(ptm->tmOverhang);
if(FT_IS_SCALABLE(font->ft_face) && font->fake_bold)
{
ptm->tmAveCharWidth++;
ptm->tmMaxCharWidth++;
}
SCALE_X(ptm->tmAveCharWidth);
SCALE_X(ptm->tmMaxCharWidth);
@ -7778,11 +7783,8 @@ static BOOL get_outline_text_metrics(GdiFont *font)
}
TM.tmMaxCharWidth = SCALE_X(ft_face->bbox.xMax - ft_face->bbox.xMin);
TM.tmWeight = FW_REGULAR;
if (font->fake_bold) {
TM.tmAveCharWidth++;
TM.tmMaxCharWidth++;
if (font->fake_bold)
TM.tmWeight = FW_BOLD;
}
else
{
if (ft_face->style_flags & FT_STYLE_FLAG_BOLD)