From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Preventing Controls and Text From Resizing With OS Font Settings

Hi,

 

This is related to the issue of text resizing of controls and labels when the OS font size setting is changed.  See the image before and after (right) the Windows font size (Ctrl Panel--> Display) settings are changed from 100% to 125 %.

 

post-11742-0-46875100-1383057884.png

 

The solution given at the Lava forums Here recommends the following solution which I'm unsure about.

 

Picture1.png


 

Questions:

1. What is the LABVIEW.ini and app.ini??  Where are they located, where, when and how do you modify them?  I am only familiar with the installer setup.ini.

2. Can anyone elaborate on what this line of code does and how to customise it?  Why have they used "13dialogFont"?  What fields are valid here?

3. In Windows 8.1 I have noticed the problem has changed slightly.  There is not longer the 100 %, 125 % or 150 % font size settings under Control Panel --> Display.  I believe this did exist for Windows 8 and certainly does for Windows 7 and XP.  How does this change things as now you can specify in Windows 8.1. to change text size for Title bars, menus, Message boxes, Palette titles, Icons and Tooltips explicitly.  Will these ini settings fix these as well?  This last point I'll need to do some experimenting with in VM.


I should also include the following from Here

 

The Application font is the LabVIEW default font used in the Controls palette, the Functions palette, the context help, and tip strips.

  • (Windows 7/Vista) LabVIEW uses Segoe UI by default.
  • (Windows XP) LabVIEW uses the font that Windows uses for filenames in Windows Explorer. The U.S. version of Windows usually uses Tahoma. The size of the font depends on the settings of the video driver because you can set higher resolution video drivers to use Large Fonts or Small Fonts. In order to maintain consistency, use Small Fonts and Windows standard settings.
  • (Mac OS X) LabVIEW uses Lucida Grande by default.
  • (Linux) LabVIEW uses Helvetica by default.

The System font is the LabVIEW default font used for menus.

  • (Windows 7/Vista) LabVIEW uses Segoe UI by default.
  • (Windows XP) LabVIEW uses the same as the Application font, but the font size may differ.
  • (Mac OS X) LabVIEW uses Lucida Grande by default.
  • (Linux) LabVIEW uses Helvetica by default.

The Dialog font is the LabVIEW default font used for text in dialog boxes and system controls.

  • (Windows 7/Vista) LabVIEW uses Segoe UI by default.
  • (Windows XP) LabVIEW uses the same font as the Application font.
  • (Mac OS X) LabVIEW uses Lucida Grande by default.
  • (Linux) LabVIEW uses Helvetica by default.

When you port a VI that contains one of these fonts to another platform, LabVIEW ensures the font maps to something similar on that platform.

 

 

0 Kudos
Message 1 of 9
(5,405 Views)

Read this very recent thread.  (last response was less than 4 hours ago!)  http://forums.ni.com/t5/LabVIEW/Front-panel-indicators-labels-etc-change-sizes-and-location-when/td-...

 

LabVIEW.ini is in your Program Files directory  National Instruments\LabVIEW XXXX  right next to LabVIEW.exe

 

app.ini refers to the .ini file that gets created when you build your LabVIEW project into an .exe and is located in the same folder where  YourApp.exe resides.

 

I haven't used LabVIEW with Windows 8 yet to know if there is anything different.

 

Also read http://labviewwiki.org/LabVIEW_configuration_file/Fonts

 

Message 2 of 9
(5,398 Views)

I've manually set the font type size for control labels.  However, this doesn't seem to work for certain controls such as ring controls.

 

Therefore applying the fixed font type and size in the .ini file(s) is the solution and I should change all font types back to say System type then the systemFont and FPfont setting with apply to all controls and labels?

 

Why do this for the LabVIEW ini and app ini??

0 Kudos
Message 3 of 9
(5,353 Views)

You don't set these things for just labels.  You need to set it for the controls themselves as well.

 

I believe FPfont only works for new controls, not the ones already in the VI.

 

You need it in LabVIEW.ini for when you are working in the development environment.  You need it in the "app".ini for when you build the project into an application and you run it as an executable.

 

Be sure you are not using System controls.  I think they will directly from the OS and you can't change them to non-system fonts.

0 Kudos
Message 4 of 9
(5,350 Views)

You can't set the font in a ring control for example.

 

I always use System controls.  The following should deal with it.

 

systemFont

Example: systemFont="Arial" 12 B

 

Thanks.

0 Kudos
Message 5 of 9
(5,345 Views)

Yes, you can set the font of a ring control.  I was even able to set it for a System style ring control.  (I didn't think that was possible.)

 

Setting the systemfont like that should lock in the font.  When it is set for a digit, that is when it ties it to the fonts that are set by the Windows OS.

0 Kudos
Message 6 of 9
(5,342 Views)

Oh good can be done for Ring after all.  I assume can be done for tree.

 

The embarrassing problem I'm currently trying to fix is that I set 80 % of the fonts (labels and ctrls) manually but 20 % of the ctrls are now distorted on customers PC with different font setting.

 

I think the app.ini setting is the safest approach.

 

I did plan to use Segoe UI for Win XP, 7 and 8.

 

According to Wiki Here

 

Availability[edit]

The Segoe UI font family can be obtained as part of Microsoft Office 2007, Microsoft Office 2010, Windows Vista, Windows 7 or Windows 8. Certain Segoe fonts, but not Segoe UI, were included in Windows XP Media Center Edition 2005, replacing Trebuchet MS.

Segoe UI is installed into Windows XP if the user installs Windows Live Messenger, or Windows Live Mail, which are available as free downloads. Microsoft Word Viewer and Microsoft PowerPoint Viewer 2007 install certain Segoe fonts, but not Segoe UI.

A semilight version of Segoe UI is installed into Windows 7 if the user installs Microsoft Office 2013.

0 Kudos
Message 7 of 9
(5,332 Views)

I think that should work fine for you.  Good luck.

0 Kudos
Message 8 of 9
(5,329 Views)

I now use the attached VI in the 'execute VI after build' dialog box so that the necessary font information is automatically appended to the default ini settings whenever an application is built.

Capture.JPG

Hope that helps others with similar problems...

Al

0 Kudos
Message 9 of 9
(5,052 Views)