[Lazarus] copy from topenglcontrol
Andrea Mauri
andrea.mauri.75 at gmail.com
Wed Jul 8 14:10:39 CEST 2009
Graeme Geldenhuys wrote:
> But currently my Windows and Linux use the same 96 dpi setting, yet
> the 8 pt font under Windows is the same size as a 10 pt font under
> Linux. So the dpi value doesn't seem to be the only culprit. I'm using
> Arial on both platforms as my default font in my applications.
Indeed DPI does not seem to be the only "difference". I've simply
specified the point size in an #IFDEF clause at application
instantiation time based on the detected O/S and platform that I have
found "just works" but it may in fact not work for everyone :-(
> Also, I follow a mixed bag of UI Guidelines - font sizes similar to
> Mac OS X. I use different size fonts in one form.
Unfortunately that probably means you're stuck with a need for more font
fixup coding. I guess in that case I'd recommend abstracting the font
specs required into globally accessible TFont instances created at
application start and set up based on O/S and platform and then use
these to establish the fonts for all your widgets that require them. At
least that way the #IFDEF'd O/S and platform detection part is in one
isolated place in the application.
-b
More information about the Lazarus
mailing list