santhosh
santhosh

Reputation: 91

Load custom font file from application specific folder

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,

Upvotes: 2

Views: 2163

Answers (1)

manuell
manuell

Reputation: 7620

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.

Upvotes: 2

Related Questions