Add a test showing that GDI should not scale bitmap font metrics
Huw D M Davies
h.davies1 at physics.ox.ac.uk
Wed Sep 1 04:53:34 CDT 2004
On Wed, Sep 01, 2004 at 06:49:14PM +0900, Dmitry Timoshkov wrote:
> "Huw D M Davies" <h.davies1 at physics.ox.ac.uk> wrote:
> > > I had a wild guess whether GDI actually scales or not metrics for
> > > a bitmap font if a requested font size is not available and wrote
> > > a test case for it. No, GDI *does not* scale bitmap font metrics.
> > Well it does do integer scaling. So if you request System (whose
> > normal size is 16) with 32 <= lfHeight < 48 you'll get a double sized
> > font with all the metrics scaled by a factor of two. Wine doesn't do
> > this yet. Your test shows that gdi doesn't do fractional scaling which
> > is indeed correct.
> Thanks for pointing this out. A quick addition to the submitted test
> case (attached) confirms that win2k does integer scaling. But it does
> it in a somewhat inconsistent manner. For instance GetTextExtentPoint32
> scales only height but not width, and GetCharWidth does not scale width
> either. I'm a bit confused, is that a bug or a feature?
Try setting lfWidth to 0, that should then scale the font
isotropically - setting a non-zero lfWidth can result in different
scaling factors in the x and y directions. So for example if you
leave width set to the normal width and only multiply up the height
then the font will only be scaled in the y direction.
huw at codeweavers.com
More information about the wine-devel