[comp.lang.postscript] How to access font width info

ronniek@cs.tamu.edu (Ronnie Killough) (06/13/90)

We have Transcript 2.1 (I think that is the version).  Anyway, somewhere
there must be some font tables that contain the ?metrics? information
for the fonts...all I need is Times and Helvetica.  And, all I need is
the width, and maybe the left-side bearing.  Where are these tables,
and how do I access this information from a C program?

Thanks for any help you can give me!

Ronnie

chow@wanjina.Berkeley.EDU (Ed Chow) (06/15/90)

In article <5802@helios.TAMU.EDU> ronniek@cs.tamu.edu (Ronnie Killough) writes:
>We have Transcript 2.1 (I think that is the version).  Anyway, somewhere
>there must be some font tables that contain the ?metrics? information
>for the fonts...all I need is Times and Helvetica.  And, all I need is
>the width, and maybe the left-side bearing.  Where are these tables,
>and how do I access this information from a C program?
>
>Thanks for any help you can give me!
>
>Ronnie

YES, somewhere in your local filesystem there should be a directory that
contains all the PostScript binaries and scripts *and* font metric files.
If you're on a UNIX system, you should do a "man transcript" and look at the
section entitled "FILES" therein to see the name of that directory.

The font metric files you are looking for are called Adobe Font Metric files
and have names like  "Helvetica.afm"  or  "Times-Roman.afm".  They are 
quite readable, even by humans, and contain more information than you would
ever care to know about the respective fonts.   A  C  program should have
no difficulty extracting the required information: just skip over the stuff
you don't need.

Hey Adobe, am I allowed to divulge the contents of these font metric files??

-Ed