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: 

Setting fonts in real-time Linux

I have a question about fonts in real-time Linux.  I have an application that I'm deploying to both cRIO (RT Linux with GUI) and Windows.  When I deploy the GUI to RT Linux the fonts are messed up (typically too big to fit into their containers).  Is there a way to control this, similar to using the EXE.ini file for built applications in Windows where you can add the same font entries that you add to your LabVIEW.ini file?  For example:

appFont="Segoe UI" 13
dialogFont="Segoe UI" 13
systemFont="Segoe UI" 13

 

Thanks in advance...

0 Kudos
Message 1 of 3
(3,880 Views)

Hi Eric,

 

Check out this KB, it talks about the issue of font difference with visual comparison. What RT controller are you using?

 

I think the best way to approach this issue is testing with different font/size and find one that works. 

 

 

Ren H.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 3
(3,833 Views)

Ren, thank you for the reply.  I am using both the cRIO-9033 and cRIO-9035.  I am aware of the KB.  However, I'm looking for consistency programmatically for the GUI in both Windows and Linux RT environments.  I was hoping for a Linux feature that is the equivalent of the *.ini file in Windows, but I'm guessing that doesn't exist.

 

For anyone who may be looking for a similar solution, the way I worked around this is via brute force.  It's a bit tedious to program, but it worked great.  I used a conditional compile against the 'OS' Conditional Disable Symbol.  If 'Win', I didn't do anything and just let the *.ini file control the font sizes.  If 'Linux', I created a utility VI that extracts references to all of the FP controls/indicators and decorations and sets the font sizes of each of their components (Caption, text, boolean text, number, etc.).  I tested the error out for each of the class types via the 'To More Specific Class' function to determine which type of object it is.  For example, if it's a String control/indicator, I set both 'Caption --> Font --> Size' and 'Text --> Font --> Size'.

 

Happy coding!

Eric

Message 3 of 3
(3,826 Views)