Question

My Win32 application has to load a custom font file from ProgramFiles folder. Is it possible to load a custom font file from custom location? If so how can I load a custom font file?

Please suggest.

Thanks,

Was it helpful?

Solution

Use AddFontResource or AddFontResourceEx

Note:

When an application no longer needs a font resource that it loaded by calling the AddFontResource function, it must remove that resource by calling the RemoveFontResource function. This function installs the font only for the current session. When the system restarts, the font will not be present. To have the font installed even after restarting the system, the font must be listed in the registry.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top