开发者

How to install a font without logging off or rebooting a PC?

开发者 https://www.devze.com 2023-03-10 11:27 出处:网络
Is there a way or an API to install a font on the PC fo开发者_开发问答r every user, without logging off or restarting the PC?See the MSDN document, Font Installation and Deletion, for full details. In

Is there a way or an API to install a font on the PC fo开发者_开发问答r every user, without logging off or restarting the PC?


See the MSDN document, Font Installation and Deletion, for full details. In summary:

  • Copy the font file to the fonts directory (%windir%\fonts).
  • Call AddFontResource() to ensure the font is immediately available.
  • Broadcast the WM_FONTCHANGE message.

Thanks to @Alex K for cleaning this up and adding the fine detail.

0

精彩评论

暂无评论...
验证码 换一张
取 消