开发者

Determining TTF Font File Name

开发者 https://www.devze.com 2023-01-02 21:24 出处:网络
If I have a .NET Font object, is there a way to programmatically det开发者_JS百科ermine which ttf file in the C:\\Windows\\Fonts directory it was created with?This helpful article suggests that by loo

If I have a .NET Font object, is there a way to programmatically det开发者_JS百科ermine which ttf file in the C:\Windows\Fonts directory it was created with?


This helpful article suggests that by looking at registry key

HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts

You'll get a list of fontname, filename pairs. Open said registry key, iterate through the names until you find a match, then the value contains the filename (without a path).

0

精彩评论

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

关注公众号