Re: Getting Info from a .TTF File



The following is a C example, but if you can wade through it, it should let
you extract the name from a TTF file:
http://www.codeguru.com/cpp/g-m/gdi/fonthandlinganddetection/article.php/c3659/#more.
It's not exactly an easy undertaking, but it's certainly doable.

For a more broad-based overview, have a look at this:
http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&item_id=IWS-Chapter08#3054f18b.
You'll want to focus mainly on the "name" section for your purposes.

The one thing you need to be aware of is that not everything that looks like
a .TTF file IS a .TTF file, at least not in the strictest sense. Take your
TIMES.TTF file as an example...on Windows XP, it's actually an OpenType
font, not a TrueType font. If the font ends in .TTF, though, it's supposed
to follow a compatible standard, whether it's actually an OpenType or
TrueType font. I've never actually tried to parse OpenType files, though,
so I only know that they SHOULD behave the same, not whether or not they DO.


Rob

"Doug van Vianen" <courses@xxxxxxxx> wrote in message
news:u51m8xuWHHA.4384@xxxxxxxxxxxxxxxxxxxxxxx
Hi,

I have a VB6 program that needs to find the font name from the file that
contains the font. For example, I would like my program to be able to
access the font file TIMES.TTF and then from that file determine the name
of the font eg, Times New Roman.

Notice that the font may or may not actually be installed on the computer
running the program. It may just be a file on, say, a CD. Nevertheless,
coding to provide the above only for fonts actually installed on the
computer would be a good start.

Thank you.

Doug vV



.



Relevant Pages

  • Re: enclose font in website
    ... about the software used to create it, but the resultant font file. ... Your program is using the TTF file on your local machine and you have ... It is your video card driver. ... Compare this to the GIF file format. ...
    (alt.html)
  • Re: How to create ttf file
    ... The glyph data itself is stored within the "glyf" table of a TTF file, however from a GDI perspective you can extract the glyph data ... A TTF font is made up of vectors which are easily scalable, a Bitmap on the other hand is raster based and not so easily scalable. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: How to determine a Truetype Filename
    ... > I need to be able to determine the filename of a chosen TrueType font. ... The fonts display name is embedded somewhere in the TTF file. ... Use the newsgroup archives: ...
    (borland.public.delphi.nativeapi)
  • RE: TTF File
    ... Can't you distribute the TTF file as well as the Excel file? ... I have a TTF File containing a specialized font that i want to use in my ... The problem is that when others open the spreadsheet, ...
    (microsoft.public.excel.programming)
  • Re: using non-standard fonts
    ... Your font must contain a Unicode glyphe map. ... it's TrueType font (.ttf file). ...
    (comp.lang.java.gui)