System font width

Huw D M Davies h.davies1 at physics.ox.ac.uk
Wed Sep 22 08:02:12 CDT 2004


On Tue, Sep 21, 2004 at 07:40:17AM -0700, Jon Griffiths wrote:
> Hi,
> 
> I have an app that calls GetObject on SYSTEM_FONT and then uses the
> returned LOGFONT.lfWidth in a calculation. Wine currently returns 0
> for the width, which causes a divide by zero error here.
> 
> Testing under XP home shows that the returned with is 7 for the
> system font. This patch changes the width specified in the stock font
> list. Although this makes my app run and doesn't appear to have any
> ill consequenses, it may be better to get some advice from a font
> expert before committing this patch.

This probably won't hurt anything.  The correct way would be to load
the system font and get its metrics.

Huw.
-- 
Huw Davies
huw at codeweavers.com



More information about the wine-devel mailing list