Re: Getting Info from a .TTF File
- From: "Robert Morley" <rmorley@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 28 Feb 2007 00:46:56 -0500
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
.
- Follow-Ups:
- Re: Getting Info from a .TTF File
- From: Karl E. Peterson
- Re: Getting Info from a .TTF File
- References:
- Getting Info from a .TTF File
- From: Doug van Vianen
- Getting Info from a .TTF File
- Prev by Date: Getting Info from a .TTF File
- Next by Date: Re: Getting Info from a .TTF File
- Previous by thread: Getting Info from a .TTF File
- Next by thread: Re: Getting Info from a .TTF File
- Index(es):
Relevant Pages
|