Results 1 to 7 of 7

Thread: Fonts Fonts Fonts....

  1. #1

    Fonts Fonts Fonts....

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

  2. #2
    Quote Originally Posted by azrael11 View Post
    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....
    so I think is really hard that i am asking ... Hmmm...

    Any thouthgs ... Some direction ...

  3. #3
    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?

  4. #4
    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

  5. #5
    Quote Originally Posted by czar View Post
    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.
    No is not what i am asking for...

    With pascal code... i am asking for...

  6. #6
    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.

  7. #7
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •