Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Extracting Font info

Status
Not open for further replies.

DreXor

Programmer
Jun 17, 2003
2,224
US
trying to extract the 'friendly' font name from an FSO supplied list of font files.

this is for a font share environment for a web development team based on FSO, i already have the environment set to generate sample images of the font face , but currently the code for that is static with an array of the font names. i'm trying to make this dynamic, so when we add a font to the collections folder, the page can automatically add a set of preview images, and make the file(s) available

example : ARBLI____.TTF is Arial Black Italic

i've searched for enumerators on the internet for font viewers and source code for VB based font viewers, but have had little luck in my search

thanks ahead of time,
DreX
 
This took a fair bit of searching as well, but seems to have enough information (in the links) to allow you to look inside the fonts and extract the information. Because it's going to be a bit hairy poring through the binary files, though, I'd certainly recommend keeping the list in a table and only looking inside when you don't know what it is. :)

 
i've looked through all through the sub links of the one you supplied but i seem to be failing at finding where it is you're talking about, most everything i've found is in regards of how to design a TT font or how to distribute, what a TT is and the diffs with reg fonts etc..

thanks again
 
The info is there... it's just going to be a hassle to extract. Links below are from that page or are detailed links from those pages.

For OpenType fonts (which can hold TrueType or Postscript fonts) this page:
[tt] [/tt]
describes the format of all of the info in the font. About 3/4 of the way down the page you can see where the "Name" table is in the font. It links to this page:
[tt] [/tt]
where the name tables are described. Name IDs 1 and 2 have the font family name and the font subfamily name.

For TrueType fonts, the deprecated spec is at:
[tt] [/tt]
If you click on chapter 2 it has very similar information: where in the file the naming tables are and how they're formatted.

Like I said, it won't be easy but the information is there.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top