Dmitry Timoshkov : gdi32: Perform correct glyph scaling even if font metrics haven't been cached yet .
Module: wine Branch: master Commit: 0d6dcc1e4e17463de39f9ab267096dc7142ef863 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0d6dcc1e4e17463de39f9ab267... Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Jun 24 16:15:48 2008 +0900 gdi32: Perform correct glyph scaling even if font metrics haven't been cached yet. --- dlls/gdi32/freetype.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index fe7d2d5..95b260a 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4353,8 +4353,12 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, } /* Scaling factor */ - if (font->aveWidth && font->potm) + if (font->aveWidth) { + TEXTMETRICW tm; + + WineEngGetTextMetrics(font, &tm); + widthRatio = (double)font->aveWidth; widthRatio /= (double)font->potm->otmTextMetrics.tmAveCharWidth; }
participants (1)
-
Alexandre Julliard