UI Interest Group Blog

Community Browser
Showing results for 
Search instead for 
Did you mean: 

Re: Font Sizes in LabVIEW - Conversion Utility VI

NI Employee (retired)

Someone recently asked me if there was a way to standardize LabVIEW font sizes relative to other Windows applications as altenbach describes in his idea exchange post

Screen Shot 2013-06-07 at 3.57.12 PM.png

I did some digging and was able to write a VI to convert a point size into the equivalent LabVIEW size.

Screen Shot 2013-06-07 at 4.02.26 PM.png

I'm posting here just in case anyone else is in need of this functionality. (Note that I haven't tested the backsaved LabVIEW 8.0 VI)

Trusted Enthusiast

Something funny is still going on, I run the program to find out what size 72 point Arial should be.  Your code says 107 "point".

Create a label with 107 "point" Arial and it measures 0.75".  (72/96 = 0.75)

MS Word produces a 1.0" font with 72 pt Arial.

LV FontCalculatorIssue.png

And the backsaved version was completely messed up and crashed my LV9 mercilessly.

Edit:  Found a non-standard display setting on my machine which must not have been sniffed down by this program.  It actually gets it much closer now.  I use a lot of graphic drawing programs so I really like to have 72pt = 1 in.

NI Employee (retired)


Do you know which setting it was? If it's a common one we could track down where Windows keeps track of it and correct for it.

When I use 107 as my size in LabVIEW it lines up perfectly with 72 in WordPad (which I'm assuming renders the same as Word).

Screen Shot 2013-06-10 at 10.04.01 AM.png

Trusted Enthusiast

I'll see if I can track it down on that machine again.  I just turned off a few third-party tools and it snapped into place.

I may never use the code as you intended, but I always appreciate adding a few CLFN wrapped Windows functions to my collection. 

Active Participant

I would appreciate you publishing that collection!

Active Participant

Darin, did you ever reproduce the problem?

Active Participant

Not working for me, either. I asked for 11pt Arial, but the recommended LV font (18 pt Arial) is one pixel taller than what WordPad shows at 100% zoom.


Proven Zealot

So this is useful and I appreciate it, but what about the reverse function?  Given a LabVIEW sized font text, what point size is that?  I can probably just run the posted VI for every point size I expect, and generate a list of LabVIEW font sizes, then reverse this in some look up, but if there is a more straight forward solution I'd appreciate it.


Just a note, please keep in mind that Windows offers a "font scaling" option that tends to mess up applications. Win10 is "supposed" to be a bit better, but this sort of functionality would almost certianly not work with the windows scaling feature.

Just for kicks, I looked it up and found an article suggesting Labview *does* take windows font scaling into consideration: