Load custom font file from application specific folder

2.1k Views Asked by At

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,

1

There are 1 best solutions below

1
On BEST ANSWER

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.