winex11.drv: Associate the real DC transformation with cached font data.

Dmitry Timoshkov dmitry at codeweavers.com
Mon Jan 24 04:40:13 CST 2011


This matches what WineEngCreateFontInstance() does, and makes applications
which set custom axes directions using different window/viewport extents
display text correctly.
---
 dlls/winex11.drv/xrender.c |    6 +++++-
 include/wingdi.h           |    1 +
 2 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c
index f0ec1b1..fde0b91 100644
--- a/dlls/winex11.drv/xrender.c
+++ b/dlls/winex11.drv/xrender.c
@@ -1066,7 +1066,11 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont)
     lfsz.lf.lfWidth = abs( lfsz.lf.lfWidth );
     lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth );
     lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight );
-    GetWorldTransform( physDev->hdc, &lfsz.xform );
+
+    GetTransform( physDev->hdc, 0x204, &lfsz.xform );
+    TRACE("font transform %f %f %f %f\n", lfsz.xform.eM11, lfsz.xform.eM12,
+          lfsz.xform.eM21, lfsz.xform.eM22);
+
     /* Not used fields, would break hashing */
     lfsz.xform.eDx = lfsz.xform.eDy = 0;
 
diff --git a/include/wingdi.h b/include/wingdi.h
index 12e28dc..29fb351 100644
--- a/include/wingdi.h
+++ b/include/wingdi.h
@@ -3590,6 +3590,7 @@ WINGDIAPI INT         WINAPI GetTextFaceW(HDC,INT,LPWSTR);
 WINGDIAPI BOOL        WINAPI GetTextMetricsA(HDC,LPTEXTMETRICA);
 WINGDIAPI BOOL        WINAPI GetTextMetricsW(HDC,LPTEXTMETRICW);
 #define                      GetTextMetrics WINELIB_NAME_AW(GetTextMetrics)
+WINGDIAPI BOOL        WINAPI GetTransform(HDC,DWORD,XFORM*);
 WINGDIAPI BOOL        WINAPI GetViewportExtEx(HDC,LPSIZE);
 WINGDIAPI BOOL        WINAPI GetViewportOrgEx(HDC,LPPOINT);
 WINGDIAPI BOOL        WINAPI GetWindowExtEx(HDC,LPSIZE);
-- 
1.7.3.5




More information about the wine-patches mailing list