Module: wine Branch: master Commit: 376adf9438907f4e6147d8b2c33ea941aca6835d URL: http://source.winehq.org/git/wine.git/?a=commit;h=376adf9438907f4e6147d8b2c3...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Sat Nov 1 17:44:05 2008 +0800
gdi32: Try to avoid not necessary glyph transformations.
---
dlls/gdi32/freetype.c | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 2e64038..9e3ec02 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -3321,6 +3321,14 @@ GdiFont *WineEngCreateFontInstance(DC *dc, HFONT hfont) dcmat.eM21 = dcmat.eM12 = 0; }
+ /* Try to avoid not necessary glyph transformations */ + if (dcmat.eM21 == 0.0 && dcmat.eM12 == 0.0 && dcmat.eM11 == dcmat.eM22) + { + lf.lfHeight *= fabs(dcmat.eM11); + lf.lfWidth *= fabs(dcmat.eM11); + dcmat.eM11 = dcmat.eM22 = 1.0; + } + TRACE("DC transform %f %f %f %f\n", dcmat.eM11, dcmat.eM12, dcmat.eM21, dcmat.eM22);
@@ -4606,9 +4614,8 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, ft_bitmap.pixel_mode = ft_pixel_mode_mono; ft_bitmap.buffer = buf;
- if(needsTransform) { - pFT_Outline_Transform(&ft_face->glyph->outline, &transMat); - } + if(needsTransform) + pFT_Outline_Transform(&ft_face->glyph->outline, &transMat);
pFT_Outline_Translate(&ft_face->glyph->outline, -left, -bottom );