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
I did some digging and was able to write a VI to convert a point size into the equivalent LabVIEW size.
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)
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.
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.
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).
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.
I would appreciate you publishing that collection!
Darin, did you ever reproduce the problem?
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.
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.
Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW OverlordInteresting in learning all you can about automotive CAN bus communication? Checkout my 12 part CAN Blog series.Checkout and help contribute to the community driven LabVIEW Wiki.
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:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.