LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

How to install Font on target computer

Hello all,
 
My application uses the NIDialog font as default for all controls and labels in the User Interface. On most computers where my application is installed, this font refers to MS Sans Serif. Problem is that there are a few computers where this is not the case. On this computers, some other font is used, which messes up the user interface Smiley Sad . To avoid this problem, I thought of just using MS Sans Serif as the standard font for all controls and labels, instead of the NIDialog font. Of course I have to make sure that the MS Sans Serif font is present on the target PC. Is the installer of my application intelligent enough to install this font automatically on the target PC. If not, how can I make sure that this font is installed correctly? I noticed that I can include files in the [Fonts] directory in the Edit Installer dialog on the File tab page (right click the Folders tree and select "All Installation Locations" from the popup menu). Do I just need to put the MICROSS.TTF (located in C:\WINDOWS\Fonts on my PC) in this location?
0 Kudos
Message 1 of 5
(3,736 Views)
Wim,
 
One other possibility is to use a specific font - preferably TrueType - that will be (should be) present on all target machines.  This list may be useful, and Tahoma or Arial may be a good choice. However MS Sans Serif also appears there.Smiley Sad Is it really the case that MS Sans Serif is not present on those machines, or is it just that NI Dialog does not map to it, (perhaps due to users customizing the appearance)? 
 
Though I have not tested or investigated it, I seems very safe to me to assume that the [Fonts] entry for the installer will always work.
 
--Ian
 
 
 
 
 
Message 2 of 5
(3,727 Views)

Hello Ian,

I have no information about the settings on these machines. I assume that NI Dialog doesn't map to the MS Sans Serif font. I'm probably just going to use this font directly instead of using the NIDialog font, and put the font in the installer.

0 Kudos
Message 3 of 5
(3,725 Views)
Ok. Good luck.  For completeness and the benefit of others, here is the (dated) NI page on font mappings.
0 Kudos
Message 4 of 5
(3,718 Views)

You do not need to install the fonts on Windows, for using it in your application.
You can copy the font file during the installation of your program in a sub-folder, such as "\\fonts".
In main () you must add the SDK function (you must also include the library "gdi32.lib")

#include "windows.h"
AddFontResource ("fonts\\xxxxxxxx.ttf");

This allows you to use the fonts without installing it in Windows, for the duration of the user's login session.
It works even if you logged in as a standard user.

Fabrizio

0 Kudos
Message 5 of 5
(2,882 Views)