From 8cdca3980acc01f6be996647a593079613c1e21d Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Tue, 24 Jun 2008 16:11:57 +0900 Subject: [PATCH] gdi32: Apply the custom transform to a glyph only if it's not an identity one. --- dlls/gdi32/freetype.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c index 5a3717003b1..4782d664c9e 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);