I don't know much about this area of Wine, but I think the change is incorrect.
The DC's transform is applied to the font when it is rendered. To do this correctly, the glyphs must be transformed when they are rasterized and uploaded.
Note that we only appear to use the first four fields of XFORM (they are copied to a shorter FMAT2 struct) to rasterize the glyphs. The last two fields of XFORM only specify an offset, so I think they can be safely ignored.
2010/11/28 Ričardas Barkauskas miegalius@gmail.com:
Makes Steam store page scrolling smoother. Didn't find where this field would be used or what relevant difference between fonts it would indicate for this caching. Without it lots of fonts differing only by fields in this structure are created in such a way that they get marked as unused almost immediately and thus cache entries get reused fast. Hacking to allow for much more generous cache growth resulted ~880 entries (in short run) in font cache and it still managed not to find font in cache quite often. With this I didn't notice any such growth, no visual changes and no tests complained (that don't complain usually). Don't know what if any tests I could write for this (or more likely I simply wouldn't be able :P).
Rčardas Barkauskas REalm
On Sun, Nov 28, 2010 at 08:36:51PM -0600, Vincent Povirk wrote:
I don't know much about this area of Wine, but I think the change is incorrect.
The DC's transform is applied to the font when it is rendered. To do this correctly, the glyphs must be transformed when they are rasterized and uploaded.
Note that we only appear to use the first four fields of XFORM (they are copied to a shorter FMAT2 struct) to rasterize the glyphs. The last two fields of XFORM only specify an offset, so I think they can be safely ignored.
Steam still has a 1x0x0x1 matrix, and only sends different eDX and eDY values.
So would setting them to 0 help? Like this?
--- dlls/winex11.drv/xrender.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/xrender.c b/dlls/winex11.drv/xrender.c index 4f900b2..f0ec1b1 100644 --- a/dlls/winex11.drv/xrender.c +++ b/dlls/winex11.drv/xrender.c @@ -1067,6 +1067,9 @@ BOOL X11DRV_XRender_SelectFont(X11DRV_PDEVICE *physDev, HFONT hfont) lfsz.devsize.cx = X11DRV_XWStoDS( physDev, lfsz.lf.lfWidth ); lfsz.devsize.cy = X11DRV_YWStoDS( physDev, lfsz.lf.lfHeight ); GetWorldTransform( physDev->hdc, &lfsz.xform ); + /* Not used fields, would break hashing */ + lfsz.xform.eDx = lfsz.xform.eDy = 0; + lfsz_calc_hash(&lfsz);
info = get_xrender_info(physDev);