gdi32: Perform correct glyph scaling even if font metrics haven't been cached yet
Dmitry Timoshkov
dmitry at codeweavers.com
Tue Jun 24 02:15:48 CDT 2008
Hello,
Changelog:
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;
}
--
1.5.5.4
More information about the wine-patches
mailing list