Can someone tell me how can i get the Typeface name of a font...
And how can i take the windows name of the font having the Typeface name...?
Thanks....
Can someone tell me how can i get the Typeface name of a font...
And how can i take the windows name of the font having the Typeface name...?
Thanks....
I don't really know what a Typeface name is. In general there could be more answers if you explained what the whole problem is. Why do you need to know that name and what graphics library etc would use it?
If you double click the ttf then you get the name of the font, just refer to that name in your program. However, I have a feeling that that is not exactly what you are wanting to do.
The views expressed on this programme are bloody good ones. - Fred Dagg
You will probably need to call Win32 API EnumFontFamilies, which will enumerate all fonts. You can check it against the font you are looking for and then extract the desired typeface name from the enumeration function.
Heyheyhey, I can post again which means I can reply to this at last! yay!
I remember reading through the Sdl_Ttf library for my own libs and came accross a page which relates to TTF info calls. I'll see if I can dig it up. I also believe the same can be done with freetype, but not entirely sure since it was on one of those FCL examples...
For the potential sdl solution check here: http://jcatki.no-ip.org/SDL_ttf/SDL_ttf_35.html#SEC35 - although I have not tried it, the description fits the bill
I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.
Bookmarks