System font width

Jon Griffiths jon_p_griffiths at
Tue Sep 21 09:40:17 CDT 2004


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.


    Use a (seemingly xp default) width of 7 for system fonts.

"Don't wait for the seas to part, or messiahs to come;
 Don't you sit around and waste this chance..." - Live

jon_p_griffiths at

Do you Yahoo!?
Declare Yourself - Register online to vote today!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gdi_font.diff
Type: text/x-diff
Size: 4885 bytes
Desc: gdi_font.diff
Url :

More information about the wine-patches mailing list