Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Setup fonts?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Titre:
Divers
Thread ID:
00265937
Message ID:
00266093
Vues:
18
>When we install some fonts for our system on a new windows computer, the window's fonts don't automatically get updated. We have to physically go into the fonts folder and then go into the application to get them to appear correctly. We are using the Visual Foxpr Setup Wizard to create our setup. Is there anything we can do programmatically to make this happen. We've seached quite a bit, and we've even looked through our TechNet CDs.
>
>Any help would be appreciated!!
>
Hi John,

Installing fonts is really not possible if done in VFP code. The installation process calls for a call to EnumFontFamilies() which requires a callback function.

OTOH, you can make the font(s) available to your application by calling AddFontResource() in the Win32api. Ed Rauh has posted an FAQ in the Win32API and other APIs section. What you could do is at the start of your code, add the font resource following the steps in Ed's FAQ. It would then be available to it.

In addition to what Ed presents, I'd also recommend that you remove the resource when the application shuts doing using:
DECLARE INTEGER RemoveFontResource IN WIN32API;
  STRING @lpfontfile
* lcfontfile is the name of the font file
= RemoveFontResource(@lcfontfile)
hth,
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform