Commit 68f9fb55 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

gdi32: Fix synthetic bold outline text metrics.

Without this fix, synthetic tmAveCharWidth value unintentionally affects SCALE_X calculation. Signed-off-by: 's avatarAkihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: 's avatarHuw Davies <huw@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 1bd9cb34
......@@ -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)
......
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