[Interest] Cross-platform font normalization best practice
Till Oliver Knoll
till.oliver.knoll at gmail.com
Wed May 13 09:07:12 CEST 2015
> Am 12.05.2015 um 18:00 schrieb Bob Hood <bhood2 at comcast.net>:
>
> I see that on Windows, Designer defaults to the "MS Shell Dialog 2" 8-point
> font, and on OS X (Yosemite) it is ".Helvetical Neue DeskInterface" 13-point
> (in one field, while another oddly reports an "Al Bayan" typeface). I have
> found that changing the OS X interface to use "Lucida Grande" 11-point instead
> of ".Helvetical Neue DeskInterface" 13-point makes it very close to the
> Windows font appearance.
Now if I understand your need correctly you want the same font be used across all platforms, to have the same appearance (even if that brakes with font conventions on a specific platform), is that correct?
So another option could be to ship a "well-behaving font" (*) with your app and set it up using http://doc.qt.io/qt-5/qfontdatabase.html (a quick google research gave me the impression that Qt also checks in QTDIR/lib/fonts, at least the embedded Qt version - that path can probably be set relative to your application path, too).
Cheers,
Oliver
(*) All relevant name fields are in english and the font lookup is known to work on all relevant platforms; check with your local lawyer for font distribution rights!
More information about the Interest
mailing list