Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I install my own font?
Message
From
17/01/2001 00:49:53
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00464252
Message ID:
00464547
Views:
13
>>There's sample code in the FAQ explaining how to install/register a font programmatically in a program.
>
>Does that persist across reboots? Q186722 a piece of that code adds a registry key, without which I never could get the fonts to "stick".

AddFontResource should be permanent; at least that's how I read the description in Rich Simon's "Win32 API SuperBible" in the examples for AddFontResource() and CreateScalableFontResource(); basically, if it's a TTF, you CreateScalableFontResource(0,Name of .TTF,Name of .FOT to Create,0) to generate the .FOT from the .TTF, then AddFontResource(Name of .FOT generated), and finally SendMessage(HWND_BROADCAST, WM_FONTCHANGE,0,0), but I could be wrong - InstallShiedl handles the task transparently, and I only do one font install programmatically from a VFP app, and it's possible that it gets called every time I try to reference the needed font. You do need to place it in the CSLID for the Windows Font directory during the copy process before installation.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform