Module: wine Branch: master Commit: 8cdca3980acc01f6be996647a593079613c1e21d URL: http://source.winehq.org/git/wine.git/?a=commit;h=8cdca3980acc01f6be996647a5... Author: Dmitry Timoshkov <dmitry(a)codeweavers.com> Date: Tue Jun 24 16:11:57 2008 +0900 gdi32: Apply the custom transform to a glyph only if it's not an identity one. --- dlls/gdi32/freetype.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 5a37170..4782d66 100644 --- a/dlls/gdi32/freetype.c +++ b/dlls/gdi32/freetype.c @@ -4265,6 +4265,12 @@ static inline BOOL is_identity_FMAT2(const FMAT2 *matrix) return !memcmp(matrix, &identity, sizeof(FMAT2)); } +static inline BOOL is_identity_MAT2(const MAT2 *matrix) +{ + static const MAT2 identity = { {0,1}, {0,0}, {0,0}, {0,1} }; + return !memcmp(matrix, &identity, sizeof(MAT2)); +} + /************************************************************* * WineEngGetGlyphOutline * @@ -4411,7 +4417,8 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format, } /* Extra transformation specified by caller */ - if (lpmat) { + if (lpmat && !is_identity_MAT2(lpmat)) + { FT_Matrix extraMat; extraMat.xx = FT_FixedFromFIXED(lpmat->eM11); extraMat.xy = FT_FixedFromFIXED(lpmat->eM21);