Dmitry Timoshkov : gdi32: Font scaling transform is performed separately.
Alexandre Julliard
julliard at winehq.org
Tue Jun 24 06:46:37 CDT 2008
Module: wine
Branch: master
Commit: 8a6628aea59f6f7ba0eb85d6a72297bbb72e7b85
URL: http://source.winehq.org/git/wine.git/?a=commit;h=8a6628aea59f6f7ba0eb85d6a72297bbb72e7b85
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Tue Jun 24 16:11:21 2008 +0900
gdi32: Font scaling transform is performed separately.
---
dlls/gdi32/freetype.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/freetype.c b/dlls/gdi32/freetype.c
index bccb063..69e077d 100644
--- a/dlls/gdi32/freetype.c
+++ b/dlls/gdi32/freetype.c
@@ -4346,15 +4346,16 @@ DWORD WineEngGetGlyphOutline(GdiFont *incoming_font, UINT glyph, UINT format,
else
widthRatio = font->scale_y;
- left = (INT)(ft_face->glyph->metrics.horiBearingX * widthRatio) & -64;
- right = (INT)((ft_face->glyph->metrics.horiBearingX + ft_face->glyph->metrics.width) * widthRatio + 63) & -64;
+ left = (INT)(ft_face->glyph->metrics.horiBearingX) & -64;
+ right = (INT)((ft_face->glyph->metrics.horiBearingX + ft_face->glyph->metrics.width) + 63) & -64;
- adv = (INT)((ft_face->glyph->metrics.horiAdvance * widthRatio) + 63) >> 6;
+ adv = (INT)((ft_face->glyph->metrics.horiAdvance) + 63) >> 6;
lsb = left >> 6;
bbx = (right - left) >> 6;
/* Scaling transform */
- if(font->aveWidth) {
+ if (widthRatio != 1.0 || font->scale_y != 1.0)
+ {
FT_Matrix scaleMat;
scaleMat.xx = FT_FixedFromFloat(widthRatio);
scaleMat.xy = 0;
More information about the wine-cvs
mailing list