Hello everyone, is there any way to extract the font-name from a ttf file using PHP or PERL. Google turned up nothing and so did yahoo and msn. Any help much appreciated. Thanks
if you mean just the name of the font file, so by example the fontfile name is "myfont.ttf" and you want returned "myfont", that could be done in PHP like this: $fontname = str_replace(".ttf", "", $filename); PHP: (where $filename is "myfont.ttf", and $fontname will contain "myfont") If you mean something else, let me know
It is too hard, but possible. There are many formats and styles. Some place the font name before the copyright, some after, some at the beginning of the file, some in the middle and some after. Try opening some files you have in notepad and you can see if a pattern exists. Peace,