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

Alexandre Julliard julliard at winehq.org
Thu Apr 7 07:36:50 CDT 2011


Module: wine
Branch: stable
Commit: d25f3221c26a18fa718e2ef1b4dd69f3fdc0274a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=d25f3221c26a18fa718e2ef1b4dd69f3fdc0274a

Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date:   Mon Jan 24 18:40:13 2011 +0800

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

This matches what WineEngCreateFontInstance() does, and makes applications
which set custom axes directions using different window/viewport extents
display text correctly.
(cherry picked from commit 3e850b5b1439032f0e396a91169442da8e4786c9)

---

 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 53db856..d39bd42 100644
--- a/include/wingdi.h
+++ b/include/wingdi.h
@@ -3588,6 +3588,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);




More information about the wine-cvs mailing list