03-25-2014 06:27 AM - edited 03-25-2014 06:42 AM
I have a customer who wants to ensure all VI Front Panels display reasonably well on target Win7 PCs that have Font Scaling turned on. By font scaling, I mean Control Panel > Appearance and Personalization > Display > Larger 150%, which causes all displayed fonts and icons to be enlarged to make it easier to read and generally interact with Windows. Quite normal for modern high pixel-density monitors and operators with less-than-average eyesight.
LabVIEW seems to react to this setting in a peculiar way. Any text set to the default 15pt font size is scaled up by a similar proportion, but any other font sizes are left unchanged. This makes for some seriously odd results when your front panel includes a variety of text font sizes for controls, labels, scales, headers, titles etc. Anything at 15pt is scaled up and everything else is unchanged.
So. Why does LabVIEW choose to scale up only fonts at 15pt? What's the reasoning behind this?
And how can I easily account for Windows font scaling settings? Clearly I could interogate the OS to figure out the value and programmatically rescale my own text, but that's not simple - I have a lot of existing FPs and I don't want to be programmatically rescaling all my displayed strings.
The following is an image of the behaviour experienced when a VI is compiled as an executable, LV chooses to increase only the fonts set to size 15pt. The VI on the left is the VI in LabVIEW, and shows that the font sizes are 12, 13, 14, 15, 16 and 17. The VI on the right is the built application and shows that only the 15pt font has been increased in size, to 25pt. Furthermore, as expected, the string control is enlarged vertically to accommodate the larger text.
03-25-2014 08:03 AM
Hi Thoric,
the main fact is: you seem to have "15pt App font" set as standard size for your UI fonts. Only this will get influenced by Windows font scaling!
All other fonts are explicitely set by you at edit time and will stay fixed - as you requested when designing your UI…
03-25-2014 10:45 AM
@GerdW wrote:
Hi Thoric,
the main fact is: you seem to have "15pt App font" set as standard size for your UI fonts. Only this will get influenced by Windows font scaling!
All other fonts are explicitely set by you at edit time and will stay fixed - as you requested when designing your UI…
You're going to have to explain that a little more clearly to me please Gerd.
I have "15pt App font" because that's LabVIEW's default - I've not ever edited this. Are you suggesting I need to change some default in my options somewhere?
"Only this will get influenced by Windows font scaling" - why?
"All other fonts are explicitely set by you at edit time and will stay fixed" - not true. If I explicitly set a 15pt font for some text, whether in Application, System, Dialog or any other font, then it will also be resized. Anything 15pt will be resized. Any other size is not. Do you have any insight into why LabVIEW rescales only 15pt fonts?
03-25-2014 11:04 AM
Try adding:
appFont="0" 15
appFont="1" 14
appFont="2" 16
... to MyApp.ini
I have NOT tried this but suspect that adding the non- default tokens ("appFont="0" 15" is the default token) might trigger some Windows magic for "YourApp"
03-25-2014 11:20 AM - edited 03-25-2014 11:22 AM
@JÞB wrote:
Try adding:
appFont="0" 15
appFont="1" 14
appFont="2" 16
... to MyApp.ini
I have NOT tried this but suspect that adding the non- default tokens ("appFont="0" 15" is the default token) might trigger some Windows magic for "YourApp"
The three keys are all the same, so the last key is dominant. Therefore, I added the first key to enforce font size 15 for Application Font, and hazaar! It works! By works, I mean the font size is not rescaled anymore. So now I at least have some consistency!
Thank you Jeff!
03-25-2014 11:21 AM
More can read on this here: http://labviewwiki.org/LabVIEW_configuration_file/Fonts
03-25-2014 12:05 PM
One of these days someone might just explain some of those ini tokens. Glad I could point you somewhere useful.