此內容不適用於您所偏好的語言。

此內容已顯示為其他適用語言。 您的瀏覽器可能含有可協助翻譯的套件。

How Can I Set the Default Font Size of Compiled LabVIEW Apps?

Updated Oct 25, 2020

Environment

Software

  • LabVIEW

I have observed that font sizes of graphical user controls in compiled LabVIEW applications vary depending on the font scaling setting of the operating system.

How can I enforce a single font size and prevent automatic font size changes without changing my system's DPI scaling settings, rebuilding all my LabVIEW projects or enforcing the font sizes in each individual VI?

With each executable built by LabVIEW, an Application.ini text file is created inside the build target folder. This configuration file accepts the same configuration options as the LabVIEW.ini

My executable already exists

For already built executables, modify the Application.ini to contain the following code:

appFont="0" <application font size in pixels> <font style tags>
dialogFont="2" 12 <dialog font size in pixels> <font style tags>

Please replace the sections marked with angle brackets with your desired font size and your desired font style tags.
Valid tags are:
Iitalic text
Bbold text
Uunderlined text

If you would like to also enforce the system font used for menus and the LabVIEW native dialogs, add the following line as well:
systemFont="1" <system font size in pixels> <font style tags>



As an example, the following line would set all controls with default application font to size 12 pixels in italic bold and underlined:
appFont="0" 12 IBU
 

Apply font settings to future builds

To enforce the font size settings without additional modifications for future builds, you an specify a custom Application.ini in the build specifications of your LabVIEW project:

  1. In the LabVIEW Project Explorer window, right click your build specification and select Properties.
  2. Navigate to the Advanced tab.
  3. Check the box for Use configuration file.
  4. Click the folder button to select your custom Application.ini file.
  5. Close the dialog with the OK button.

If you run the build specification now, your custom Application.ini should be included with the executable and running it should reflect your font customizations.