alecjcook Posted July 15, 2015 Report Share Posted July 15, 2015 Hi, What do I call programatically to get a list of all available fonts in LabVIEW please? Cheers, Alec Quote Link to comment
LogMAN Posted July 15, 2015 Report Share Posted July 15, 2015 If you don't mind .NET try this: Not sure if there is a build-in solution for that. 1 Quote Link to comment
hooovahh Posted July 15, 2015 Report Share Posted July 15, 2015 The previous solution is probably better than mine, but I can think of an alternate way. Fonts are installed in Windows in the following path %windir%\fonts You can probably perform a list files finding all installed fonts there. I'm not sure if fonts can be installed into a location other than that, and if it can then that is a reason the .Net method might be preferred. 1 Quote Link to comment
ensegre Posted July 15, 2015 Report Share Posted July 15, 2015 I would be looking at something related to <lvdir>/resource/dialog/PreferencesDialog/PreferencePages/prefPage_Misc.vi, but haven't yet figured out what. 1 Quote Link to comment
bmoyer Posted July 15, 2015 Report Share Posted July 15, 2015 Or you can get the fonts using the Windows registry. Get Fonts Installed.vi 2 Quote Link to comment
ShaunR Posted July 15, 2015 Report Share Posted July 15, 2015 (edited) xlsfonts.png Won't work on Windows. If you don't mind .NET try this: GetFontList.png Not sure if there is a build-in solution for that. Only works on Windows Lets see who cares about what Edited July 15, 2015 by ShaunR 1 Quote Link to comment
Popular Post LogMAN Posted July 15, 2015 Popular Post Report Share Posted July 15, 2015 Lets see who cares about what Let's care about anyone Alternatively don't care about anyone... but that's no fun 3 Quote Link to comment
eberaud Posted July 27, 2015 Report Share Posted July 27, 2015 Or you can get the fonts using the Windows registry. Beautiful! Thanks for sharing. Quote Link to comment
paul_cardinale Posted June 20, 2023 Report Share Posted June 20, 2023 Aggg! I can't remember how to get a snippet from LAVAG. What's the trick? Quote Link to comment
ooth Posted June 20, 2023 Report Share Posted June 20, 2023 Maybe try this https://forums.ni.com/t5/Feedback-on-NI-Community/How-do-I-get-a-snippet-from-the-board-into-my-block-diagram/m-p/3763571#M15575 Quote Link to comment
hooovahh Posted June 20, 2023 Report Share Posted June 20, 2023 Sorry I can't get them to work either. Sometimes LAVA's servers will do weird things with compression or resizing, and in the process it might strip out the meta data that is the VI file. Once we noticed this, these settings were turned off but it is possible these were back when that was an issue. Quote Link to comment
bmoyer Posted June 20, 2023 Report Share Posted June 20, 2023 (edited) I just created a new snippet to test hooovahh's explanation. Does this one work for you? Edit: Trying my example didn't work for me either. I used to be able to do it in Internet Explorer but newer web browsers don't seem to support this anymore. Edited June 20, 2023 by bmoyer Quote Link to comment
hooovahh Posted June 20, 2023 Report Share Posted June 20, 2023 I'll ping the site admin. Quote Link to comment
paul_cardinale Posted June 21, 2023 Report Share Posted June 21, 2023 Here's what I came up with. Don't know if the Unix target works. Get Font Names.vi 1 Quote Link to comment
paul_cardinale Posted June 24, 2023 Report Share Posted June 24, 2023 Unfortunately, "Get Font Names.vi" doesn't work properly on a Mac: The list returned includes names of fonts that aren't available, and is missing some that are available. Quote Link to comment
Librafoodie Posted June 24, 2023 Report Share Posted June 24, 2023 (edited) On 6/24/2023 at 7:09 PM, paul_cardinale said: Unfortunately, "Get Font Names.vi" doesn't work properly on a Mac: The list returned includes names of fonts that aren't available, and is missing some that are available. Oh, that's not good to know about how to get rid of man moobs that "Get Font Names.vi" doesn't work properly on a Mac. But we can hope that the problem will be resolved soon. Edited July 4, 2023 by Librafoodie Quote Link to comment
paul_cardinale Posted June 27, 2023 Report Share Posted June 27, 2023 This seems to work OK. But the Mac version is rather slow. Get Font Names.vi Quote Link to comment
Rolf Kalbermatter Posted June 27, 2023 Report Share Posted June 27, 2023 Unfortunately, the LabVIEW internal manager function that would return the list of enumerated fonts is not exported from the LabVIEW runtime. That would have been a lot easier and platform independent. Quote Link to comment
paul_cardinale Posted June 27, 2023 Report Share Posted June 27, 2023 Do you know of a way to invoke the font dialog? Quote Link to comment
Rolf Kalbermatter Posted June 27, 2023 Report Share Posted June 27, 2023 (edited) 4 hours ago, paul_cardinale said: Do you know of a way to invoke the font dialog? Actually, there is no direct way to call it that I would know of, but it should be possible to send the according menu command to LabVIEW. But what do you want to do then? This is not a vi, but an internal LabVIEW dialog. It does use a front panel resource like what VIs use but it is not a VI, the entire programmatic handling is a C code function. Edited June 28, 2023 by Rolf Kalbermatter Quote Link to comment
paul_cardinale Posted June 28, 2023 Report Share Posted June 28, 2023 Is there really a menu command that would invoke the font dialog? What would it be? 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.