[Bug 20420] VB6 Font size problem with custom usercontrols

wine-bugs at winehq.org wine-bugs at winehq.org
Tue Dec 21 20:34:03 CST 2010


http://bugs.winehq.org/show_bug.cgi?id=20420

--- Comment #16 from Jeff Laughlin <jeff.laughlin at gmail.com> 2010-12-21 20:34:02 CST ---
(In reply to comment #15)
> Created an attachment (id=32421)
 --> (http://bugs.winehq.org/attachment.cgi?id=32421) [details]
> Fixes this bug, I hope.
> 
> Fixes font scaling in oleaut32, and hopefully
>  http://bugs.winehq.org/show_bug.cgi?id=20420.
> 
> The factors leading to tiny unreadable fonts include
> 1. Poor font selection in the first place. Please don't even try to use 8 or 9
>    point fonts.
> 2. Badly behaved Ole components that don't call SetRatio to set the screen
>    resolution for the fonts they use.
> 3. olefonts.c hard coded a default screen resolution of 72 dpi.
> 
> The crux of this patch changes the hard coded default resolution in
> OLEFontImpl_Construct from 72 to 0 dpi. Apps that call SetRatio override this.
> Apps that dont, well the maths used to calculate the desired font size then
> calculates a font size of zero. Windows (or Wine) will not render a zero point
> font, but will select a reasonable size to use instead.
> 
> I have also revised the maths in realize_font() to operate as suggested in
> http://msdn.microsoft.com/en-us/library/dd145037%28v=VS.85%29.aspx
> 
> See also http://msdn.microsoft.com/en-us/library/ms691214%28v=VS.85%29.aspx
> 
> Tested on RHEL 6b2

Now that I think about it, instead of making the default zero, it might make
more sense to just increase the default value from 72 to 96 or something,
whatever is more typical for a modern display.

-- 
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the wine-bugs mailing list