[wxPython-users] Font Size differences between platforms
Harald Stürzebecher
harald.stuerzebecher at gmail.com
Sat Mar 24 09:41:26 PDT 2007
2007/3/24, Paul McNett <p at ulmcnett.com>:
> I've noticed that setting font point sizes has a different effect
> depending on platform. On OS X, a font size of 8 is almost unreadable,
> whereas on Linux it is very readable. Windows is somewhere in between,
> but closer to the Linux side of things.
>
>
> Here's a screenshot showing Ubuntu, Windows XP, and OS X running the
> same script:
>
> http://svn.dabodev.com/trac/dabo/browser/trunk/dabo/ui/uiwx/wxProblems/test_font_sizes.png
[...]
> I guess my question is, what is the source of the differences? I don't
> think it is resolution, because my Gtk is 96dpi just like Mac, and all
> three of these screenshots were taken from a 1280x800 screen.
Try opening the screenshot using a png-viewer and measure the size of
the characters. The "8 pt" on the right looks to me like its only 7
pixel high. Combined with some anti aliasing that might contribute to
the poor readability.
>
> I don't really expect them to be identical (they are, after all, using
> different font faces), but I'd like to come up with a way to get all
> platforms in the same ballpark of font size.
>
> Anyone else dealt with this issue and have some ideas?
I didn't have that problem yet, so I don't speak from experience. One
solution might be to find out and use the font and font size that the
user set in "Display Properties". At least Windows 2000 and KDE offer
these settings. WxPython "should have" a way to read the corresponding
values. The wxPython 2.6 demo on Windows has a "FontDialog". That
might be a place to start looking.
In my opinion, the font size should be settable by the user to adapt
to screens with unusually high or low resolution or users with poor
eyesight - e.g. IBM Laptop, 15" TFT, 1600x1200 screen.
A hardcoded value is destined to be wrong for "someone". ;-)
Harald Stürzebecher
More information about the wxpython-users
mailing list