Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically installing font in Windows

What's the trick to make a font file copied to the fonts directory and then added using AddFontResource available after a reboot?

like image 707
Dan Byström Avatar asked Oct 27 '25 07:10

Dan Byström


1 Answers

This MSDN page has this to say:

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.

I believe the key you need is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts

like image 125
Kevin Newman Avatar answered Oct 28 '25 23:10

Kevin Newman