mje Posted September 7, 2012 Report Share Posted September 7, 2012 Does LabVIEW have any capacity to resolve font types? That is say I want a text box to be monospace, or sans-serif, but really don't care what the exact font is. Is there a way for me to set this and just let the IDE figure out what the system defaults are? I'm pretty sure the answer is no, but lava often surprises me. Quote Link to comment
Minh Pham Posted September 10, 2012 Report Share Posted September 10, 2012 I would query the system fonts and use the most common one for the controls/indicators. I found this which might helps systemfontsPlay.vi Quote Link to comment
bmoyer Posted September 10, 2012 Report Share Posted September 10, 2012 Using systemfontsPlay.vi as a starting point I made a VI that will determine all of the fixed-width fonts. It's slow but it seems to work. For your application you could have 2 hidden indicators (one with "iii" and one with "www") set to the system font and see if they're the same size using the Label.Width property. Bruce Find Fixed-width Fonts.vi Quote Link to comment
mje Posted September 10, 2012 Author Report Share Posted September 10, 2012 Hehe, I already poke around the registry to obtain a font list. I'm not sure I like the idea of testing individual fonts, not only is it slow, but it doesn't help if I want to distinguish serif from sans-serif, for example. Granted, for this application all I care about is monospace... Dug this up while poking about the MSDN: Windows specific, but seems to work. Quote Link to comment
Minh Pham Posted September 11, 2012 Report Share Posted September 11, 2012 cant complaint Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.