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:
00267075
Vues:
24
>>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!!
> >
>> 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)
>
>
>
>Hello. John posted the original message in my behalf. AddFontResource executes fine, but it doesn't register the font. I copy the font into the C:\Windows\Fonts directory, execute this API function(which returns 1, meaning it was successful), and VFP still substitutes my font for another. I'm using the font with @SAY's right now. Any idea what I've done wrong, or anything else I can try? Thank you very much.
>
>
>Product Developer
>Microworks POS Solutions, Inc.

Hi Derek,

There are two possibilities. One is that your font is a member of the same "font family" as the one that is being substituted. The other is that you're neglecting to notify all open applications, via SendMessage, of the change. I've used this function myself and have supervised its use in other development environments. I've never encountered the first possibilty and never seen it fail when SendMessage was properly executed.

A third possibility does come to mind. I've only utilized this with the FoxPro report designer. So what is going on with VFP interally with @...SAY is unknown to me.
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