Detecting specific character inside TTF file

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
torontonian
Forum Newbie
Posts: 2
Joined: Wed Mar 01, 2006 3:22 pm

Detecting specific character inside TTF file

Post 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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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
torontonian
Forum Newbie
Posts: 2
Joined: Wed Mar 01, 2006 3:22 pm

Post by torontonian »

Thanks very much for replying. I think I may have found a solution. I'm trying this out now.

Thanks again.
Post Reply