Get font filename

01-22-2006, 05:15 PM
I need to have within my code a way to choose fonts by name, but have whatever is used to choose them (combobox lets say) output their path and filename instead of their windows fontname (i also kind of need to filter out the fonts so that only truetype ones show, but i guess thats for another time :p)

I have searched for a long time on (and off) this website and have not really found any good enough answers. I saw somewhere the suggestion of just using the font name and adding "%systemroot%" and ".ttf" to it, but lot of font names do not correspond with their filenames.

Does anyone know a semi easy way to do it? (pardom my n00bness :p i dont code very often)
Thx in advance for any help, its MUCH appreciated!

Cerian Knight
01-22-2006, 06:30 PM
The registry key:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Fonts
enumerates fontnames and their corresponding filenames.
If the filename has no path, it is assumed to be in the Fonts directory.
Marlett is not listed, however, because it has special system status.
All files ending in .TTF are truetype fonts.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum