diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index ba8855a9f37..420f9367ada 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -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++; } diff --git a/dlls/gdi32/tests/font.c b/dlls/gdi32/tests/font.c index 8070536c506..6243a6d3394 100644 --- a/dlls/gdi32/tests/font.c +++ b/dlls/gdi32/tests/font.c @@ -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,