Results 1 to 7 of 7

Thread: How do you get the actual font name from the font file

  1. #1

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    How do you get the actual font name from the font file

    I need to get the font name that corresponds to the font file name.

    Ex:

    The font file name ADOLESCE.TTF corresponds to the name Adolescent (True type). How do I get that name from the file?

  2. #2
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: How do you get the actual font name from the font file

    Hi randem,

    Can you reverse engineer this: http://www.codeproject.com/useritems..._font_file.asp (noting that you want it from the file)
    (I havn't looked at it btw)

  3. #3

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How do you get the actual font name from the font file

    Hey Bruce,

    Yeah, I saw that. But he doesn't get the actual information from the file. I need to get unregistered font file names. If the font is not installed (in the registry) that app won't find a name for it. I may have to cheat and use that method anyway for now until I find the other way to do it like Windows Font View and other such programs. But they all seem to be written in C...
    Last edited by randem; Sep 14th, 2007 at 02:17 AM.

  4. #4
    INXSIVE Bruce Fox's Avatar
    Join Date
    Sep 2001
    Location
    Melbourne, Australia
    Posts
    7,429

    Re: How do you get the actual font name from the font file

    Yeah, I figured you'd done that and probably peeked into the file format too. I wonder what font registration (installer) does. Similar to what you pointed out I guess.

  5. #5

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How do you get the actual font name from the font file

    Yeah, There are several tables and headers to look at and you know how unaccommodating VB is with pointers and such...

  6. #6
    Fanatic Member
    Join Date
    Jul 2007
    Location
    Essex, UK.
    Posts
    579

    Re: How do you get the actual font name from the font file

    Hi Randem, did you try this?

    http://vbnet.mvps.org/index.html?cod...uetypename.htm

    Steve.

  7. #7

    Thread Starter
    Banned randem's Avatar
    Join Date
    Oct 2002
    Location
    Maui, Hawaii
    Posts
    11,385

    Re: How do you get the actual font name from the font file

    Hey Steve,

    Great, That seems to be working for now. I think it may have a limitation to True Type Fonts but I will test that and it's way better than what I was going to do... Reading thru the registry.

    Thanks!

Posting Permissions

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



Click Here to Expand Forum to Full Width