Jump to content

get font info from a font file


JayDee173

Recommended Posts

thanks HTH,

 

But thats not quite what I was looking for (I have in fact already seen that script).

 

If you open any TTF font file, you will see such attributes as: File Name, File Size, Version, Copyright, Font Family etc.

 

Some font files have all of these fields populated, others only have minimal number of fields populated.

 

I have seen various font archive websites in the past, that display each font file + these attributes - so there must be a way (php class?) to extract this information ?????

 

Anyone done this sort of thing before?

 

Cheers,

Jay.

You open the file in windows and see all sorts of good stuff cause the windows font explorer says it's so, imagine that. The reason for that class is to take the greek and show it to you in a manner you can read, without windows conversion of the binary data. Open the file in a binary enabled editor and see whats really there.

¨
VVDMXtÚ|^
Ø
àcmap?§Þò
2
lcvt J¯)|
?`
ªfpgmÒ~¥ª
5€
ugasp


ÒP
glyf}õ_ 
Cd
~¦hdmx„@

¸
$\headÐ	aš
,
6hhea"í
d
$hmtxÃýQ‰

¨loca-e½
A
Vmaxp&
ˆ
name¹Ãò
Â

Çpost±´¯O
ÏÔ
{prepru@Ã
:ø
h


ïëÅø_<õ

°µz.
¹ÿœþºþfkú




úþf
 þºþ¼k

 

 

HTH

Teamatomic

huh ?

 

I'm just tring to find a script that will return the ttf attributes (e.g File Name, File Size, Version, Copyright, Font Family etc)

 

The script at: http://blog.yctin.com/archives/how-to-get-name-table-from-ttf-font-file-using-php/ doesnt seem to do this.

 

Anyone got any other ideas.

 

Thanks fellas , your help is much appreciated!

 

Cheers,

Jay.

yes, i gues it dont work

 

$ttf = new ycTIN_TTF();

//open font file
if ($ttf->open("/home/test/arial.ttf")) {

Array
        (
            [0] => Typeface © The Monotype Corporation plc. Data © The Monotype Corporation plc/Type Solutions Inc. 1990-1992. All Rights Reserved
            [1] => Arial
            [2] => Regular
            [3] => Monotype:Arial Regular:Version 3.00 (Microsoft)
            [4] => Arial
            [5] => Version 3.00
            [6] => ArialMT
            [7] => Arial® Trademark of The Monotype Corporation plc registered in the US Pat & TM Off. and elsewhere.
            [8] => Monotype Typography
            [9] => Monotype Type Drawing Office - Robin Nicholas, Patricia Saunders 1982
            [10] => Contemporary sans serif design, Arial contains more humanist characteristics than many of its predecessors and as such is more in tune with the mood of the last decades of the twentieth century.  The overall treatment of curves is softer and fuller than in most industrial style sans serif faces.  Terminal strokes are cut on the diagonal which helps to give the face a less mechanical appearance.  Arial is an extremely versatile family of typefaces which can be used with equal success for text setting in reports, presentations, magazines etc, and for display use in newspapers, advertising and promotions.
            [11] => http://www.monotype.com/html/mtname/ms_arial.html
            [12] => http://www.monotype.com/html/mtname/ms_welcome.html
            [13] => NOTIFICATION OF LICENSE AGREEMENT

This typeface is the property of Monotype Typography and its use by you is covered under the terms of a license agreement. You have obtained this typeface software either directly from Monotype or together with software distributed by one of Monotype's licensees.

 

of course it works. you're just a bit confused cause you were raised on windows.

YOYO

 

 

HTH

Teamatomic

hey tomatic ...

 

drop the attitute buddy !

 

Theres no need for it.

 

We are all learning here ... if you dont want to offer support in a friendly and helpful manner - keep it to yourself!

 

Try practicing being nice for a while (please, thankyou etc) ... you may find that people like you a bit more.

 

Have a nice day.

 

Peace everyone !

Cheers,

Jay.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.