mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
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:
parent
1bd9cb3471
commit
68f9fb556d
1 changed files with 6 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue