Page 1 of 1

Detecting specific character inside TTF file

Posted: Wed Mar 01, 2006 3:31 pm
by torontonian
Hi,

I would like to know how I can detect if a specific character or range of characters is present inside a .ttf font file, using PHP.

I am familiar with using imagettftext to display text in an image using a specific font, however if some of the characters that I use in my text are missing in the font, they are displayed as rectangles.

I would therefore like to write a script to examine the .ttf before using it, to check that all of the characters that I require are there.

If anyone has any information on this, I would greatly appreciate it if you could please let me know.

Thanks.

Posted: Wed Mar 01, 2006 10:16 pm
by feyd
I don't recall seeing any libraries that can get you information about font data, but these may help.

Microsoft Typography group tools: http://www.microsoft.com/typography/tools/tools.aspx
File specification information: http://www.microsoft.com/typography/Spe ... rview.mspx

Posted: Fri Mar 03, 2006 8:31 am
by torontonian
Thanks very much for replying. I think I may have found a solution. I'm trying this out now.

Thanks again.