home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 12 Font
/
12-Font.zip
/
PFMAFM.ZIP
/
GETAFM.PS
next >
Wrap
Text File
|
1991-09-12
|
2KB
|
87 lines
% Get font widths from LaserWriter
% Copyright (c) 1986 by Pipeline Associates, Inc.
/nstr 4 string def
/wstr 8 string def
/char 1 string def
/tempstr 100 string def
/np{newpath 0 0 moveto}def
/getbbox{false charpath flattenpath pathbbox}def
/FF{name findfont}def
/prtwidth {
char 0 3 -1 roll put
char stringwidth
pop round cvi wstr cvs
} def
/PrintCharMetrics {
/charnum exch def
/charname FF /Encoding get charnum get def
charname /.notdef ne
{
(C )print charnum nstr cvs print ( ; WX ) print
charnum prtwidth print ( ; N ) print
charname tempstr cvs print ( ; B ) print
np char getbbox 4
{4 -1 roll dup round cvi wstr cvs print ( ) print} repeat
pop pop pop pop
(;)=
} if
} def
/prfont {
/name exch def
(StartFontMetrics 1.0)=
(Comment Copyright (c) 1986 Pipeline Associates, Inc. All Rights reserved)= flush
(Comment Produced by getafm.ps)= flush
(FontName )print flush
FF /FontName get = flush
% (FullName )print flush
% FF /FontInfo get /FullName get = flush
% (FamilyName )print flush
% FF /FontInfo get /FamilyName get = flush
% (Weight )print flush
% FF /FontInfo get /Weight get = flush
% (ItalicAngle )print flush
% FF /FontInfo get /ItalicAngle get = flush
% (IsFixedPitch )print flush
% FF /FontInfo get /isFixedPitch get = flush
(UnderlinePosition )print flush
FF /FontInfo get /UnderlinePosition get = flush
(UnderlineThickness )print flush
FF /FontInfo get /UnderlineThickness get = flush
% (Version )print flush
% FF /FontInfo get /version get = flush
% (Notice )print flush
% FF /FontInfo get /Notice get = flush
(FontBBox )print flush
FF /FontBBox get {wstr cvs print ( ) print} forall ()= flush
FF 1000 scalefont setfont
(CapHeight )print
np (H) getbbox round cvi = pop pop pop
(XHeight )print
np (x) getbbox round cvi = pop pop pop
(Ascender )print
np (d) getbbox round cvi = pop pop pop
(Descender )print
np (p) getbbox round pop pop round cvi = pop
(StartCharMetrics)= flush
0 1 255 {
PrintCharMetrics flush
} for
(EndCharMetrics)= flush
(EndFontMetrics)= flush
} def
% Change the following line to have the correct fontname. This is
% case sensitive.
/Times-Roman prfont