LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do only 15pt fonts scale with Windows display scaling?

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.

 

FontSizeScaling.png

 

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 1 of 7
(3,442 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(3,420 Views)

@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?

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 3 of 7
(3,401 Views)

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"


"Should be" isn't "Is" -Jay
Message 4 of 7
(3,397 Views)

@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! Smiley Very Happy

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 5 of 7
(3,388 Views)

More can read on this here: http://labviewwiki.org/LabVIEW_configuration_file/Fonts

Thoric (CLA, CLED, CTD and LabVIEW Champion)


Message 6 of 7
(3,387 Views)

One of these days someone might just explain some of those ini tokens.  Glad I could point you somewhere useful.


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 7
(3,368 Views)