fonts: don't try to rotate bitmap fonts
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Wed Aug 11 06:27:34 CDT 2004
Huw Davies <huw at codeweavers.com>
Don't try to rotate bitmap fonts
--
Huw Davies
huw at codeweavers.com
Index: dlls/gdi/freetype.c
===================================================================
RCS file: /home/wine/wine/dlls/gdi/freetype.c,v
retrieving revision 1.69
diff -u -r1.69 freetype.c
--- dlls/gdi/freetype.c 10 Aug 2004 23:42:18 -0000 1.69
+++ dlls/gdi/freetype.c 11 Aug 2004 11:21:39 -0000
@@ -1824,7 +1824,7 @@
pFT_Select_Charmap(ret->ft_face, ft_encoding_apple_roman);
}
- ret->orientation = lf.lfOrientation;
+ ret->orientation = FT_IS_SCALABLE(ret->ft_face) ? lf.lfOrientation : 0;
ret->name = strdupW(family->FamilyName);
ret->underline = lf.lfUnderline ? 0xff : 0;
ret->strikeout = lf.lfStrikeOut ? 0xff : 0;
Index: dlls/x11drv/xrender.c
===================================================================
RCS file: /home/wine/wine/dlls/x11drv/xrender.c,v
retrieving revision 1.45
diff -u -r1.45 xrender.c
--- dlls/x11drv/xrender.c 6 Aug 2004 18:59:31 -0000 1.45
+++ dlls/x11drv/xrender.c 11 Aug 2004 11:21:39 -0000
@@ -1004,7 +1004,12 @@
y = pt.y;
}
+ GetTextMetricsW(hdc, &tm);
GetObjectW(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), &lf);
+
+ if(!(tm.tmPitchAndFamily & TMPF_VECTOR)) /* Non-scalable fonts shouldn't be rotated */
+ lf.lfEscapement = 0;
+
if(lf.lfEscapement != 0) {
cosEsc = cos(lf.lfEscapement * M_PI / 1800);
sinEsc = sin(lf.lfEscapement * M_PI / 1800);
@@ -1105,8 +1110,6 @@
width = X11DRV_XWStoDS(physDev, width);
xwidth = width * cosEsc;
ywidth = width * sinEsc;
-
- GetTextMetricsW(hdc, &tm);
tm.tmAscent = abs(X11DRV_YWStoDS(physDev, tm.tmAscent));
tm.tmDescent = abs(X11DRV_YWStoDS(physDev, tm.tmDescent));
More information about the wine-patches
mailing list