home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 5
/
FreshFish_July-August1994.bin
/
bbs
/
gnu
/
gs-2.6.1.4-src.lha
/
src
/
amiga
/
gs-2.6.1.4
/
pcharstr.ps
< prev
next >
Wrap
Text File
|
1994-01-27
|
2KB
|
68 lines
% Copyright (C) 1990, 1992 Aladdin Enterprises. All rights reserved.
%
% This file is part of Ghostscript.
%
% Ghostscript is distributed in the hope that it will be useful, but
% WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
% to anyone for the consequences of using it or for whether it serves any
% particular purpose or works at all, unless he says so in writing. Refer
% to the Ghostscript General Public License for full details.
%
% Everyone is granted permission to copy, modify and redistribute
% Ghostscript, but only under the conditions described in the Ghostscript
% General Public License. A copy of this license is supposed to have been
% given to you along with Ghostscript so you can know your rights and
% responsibilities. It should be in a file named COPYING. Among other
% things, the copyright notice and this notice must be preserved on all
% copies.
% pcharstr.ps
% Print the CharStrings and Subrs (if present) from a Type 1 font,
% in symbolic form.
% Load the Type 1 utilities.
(type1ops.ps) run
/printcs
{ dup type /stringtype eq
{ printcs1 (\n) print }
{ ( ) print == }
ifelse
} bind def
/printcs1
{ 4330 exch dup length string .type1decrypt exch pop
dup length lenIV sub lenIV exch getinterval
save exch 0 () /SubFileDecode filter
mark exch charstack_read
counttomark 1 sub -1 0
{ index ( ) print ==only
}
for cleartomark restore
} bind def
/printfont
{ currentfont begin Private begin 10 dict begin
gsave nulldevice FontMatrix matrix invertmatrix concat
0 1 Encoding length 1 sub
{ dup Encoding exch get dup /.notdef eq
{ pop pop
}
{ 1 index =only ( ) print ==only ( ) print
( ) dup 0 4 -1 roll put
newpath 0 0 moveto false charpath
[ pathbbox ] ==
}
ifelse
} for
grestore
CharStrings { exch ==only printcs } forall
/Subrs where
{ pop % the dictionary
0 1 Subrs length 1 sub
{ dup =only
Subrs exch get printcs
} for
} if
end end end
} bind def