views:

60

answers:

1

Hi

I'm trying to get the file corresponding to a given system font, e.g: In my system I have the font "Algerian" with the corresponding file "C:\Windows\Fonts\ALGER.TTF", and the font Batang, with the file "C:\Windows\Fonts\batang.ttc".

I've seen a couple of posts saying that I can do this by iterating the fonts folder and extracting the font name from the file header (as explained here: http://www.codeguru.com/cpp/g-m/gdi/fonthandlinganddetection/article.php/c3659/), but this seems inefficient and a bit complicated.

Is there a better way to do it? or do I have to iterate the whole directory?

Thanks

+2  A: 

In HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts you got the list of font with their filename

Lucascr