Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Install font with API
Message
 
To
11/03/1998 08:33:34
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00083698
Message ID:
00083848
Views:
24
>
>I was also hoping that someone might also have the code to tell the registry to keep the font after the machine has been restarted. For now, I can live with running this code if the FOXFONT isn't already installed.
>
>By the way, does anyone know of a good way to test if a font has been installed?
>I am currently using the following clumsy code which works, but maybe there is a better way:
>
>lFontinst = FONTMETRIC(7,"foxfont",0) = 7
>
>Thanks,

David,

You probably already have the code to do this. VFP comes with a registry class (as a prg) in the samples\classes directory. This class will allow you to read and write to and from the registry. Rick Strahl, I believe, has posted similar programming here. You'll have to add the name of the font (as it will appear in the font manager) and the file name. This data should be stored in:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Fonts

You should also copy the file(s) to the windows\fonts subdirectory.

I'd suggest that you make this part of your installation package, by adding the program as the executable to be run after setup completes.

As for determining whether or not a font is installed. Simplest is probably best, so if you've got something that works, leave it. However, you can test for the font using one of the above mentioned registry programs.
George

Ubi caritas et amor, deus ibi est
Previous
Reply
Map
View

Click here to load this message in the networking platform