[Interest] Cross-platform font normalization best practice

Bob Hood bhood2 at comcast.net
Tue May 12 18:00:06 CEST 2015


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, I need to know the best way to make this function with my project.  I can 
see a couple of options:

  1. Maintain two UI files, one for each platform, each having their own 
custom font settings.
  2. Add platform-aware code to the C++ file that manually changes the font 
for each UI component under OS X builds.

Are there options that I missed?  Perhaps, does the UI file format itself 
support platform-aware code?  If I did not miss other potential solutions, 
which of the two is considered a "best practice" for normalizing the font 
appearance across platforms?

Thanks.



More information about the Interest mailing list