Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Determining TTF Font File Name

Tags:

.net

fonts

If I have a .NET Font object, is there a way to programmatically determine which ttf file in the C:\Windows\Fonts directory it was created with?

like image 709
Nick Avatar asked Dec 03 '25 09:12

Nick


1 Answers

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).

like image 56
Bob Kaufman Avatar answered Dec 06 '25 11:12

Bob Kaufman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!