diff options
author | L Peter Deutsch <lpd@ghostscript.com> | 2000-04-06 05:25:10 +0000 |
---|---|---|
committer | L Peter Deutsch <lpd@ghostscript.com> | 2000-04-06 05:25:10 +0000 |
commit | a161ceff9c8e14e6b71d506973cab9f03159eaae (patch) | |
tree | 99d731b31755f4eed7237e8d9951658a3377d6aa | |
parent | 57a72fd9b7a2c6bef2fcb20df14d425a307b51d1 (diff) | |
download | ghostpdl-a161ceff9c8e14e6b71d506973cab9f03159eaae.tar.gz |
Extends the undocumented CCRun procedure to take an additional argument, a
Private dictionary, required by some Adobe font downloading code.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@255 a1074d23-0009-0410-80fe-cf8c14f379e6
-rw-r--r-- | gs/lib/gs_type1.ps | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/gs/lib/gs_type1.ps b/gs/lib/gs_type1.ps index 7477d327a..112d348a8 100644 --- a/gs/lib/gs_type1.ps +++ b/gs/lib/gs_type1.ps @@ -127,9 +127,33 @@ ifelse } if end } bind def -% CCRun is an undocumented procedure provided for Type 4 fonts. +% CCRun is an undocumented procedure provided for Type 4 and Type 0 fonts. 1183615869 internaldict begin +% Apparently there are two different argument lists for CCRun. +% Handling the one with the extra Private dictionary requires fabricating +% a Type 1 font on the fly, since we aren't currently prepared to parse the +% dictionary any other way. /CCRun { % <font> <code|name> <charstring> CCRun - + % <font> <code|name> <charstring> <Private> CCRun - + dup type /dicttype eq { + dup 4 index /Private .knownget { ne } { pop true } ifelse { + % The Private dictionary was supplied, and is different + % from the Private dictionary of the font. Fabricate a + % Type 1 font with this Private dictionary. Most of the + % font entries are arbitrary or not needed. + .currentglobal false .setglobal 10 dict exch .setglobal begin + /Private exch def + /FontType 1 def + /FontMatrix 3 index /FontMatrix get def + /Encoding 3 index /Encoding .knownget not { StandardEncoding } if def + /FontBBox 3 index /FontBBox .knownget not { {0 0 0 0} } if def + /PaintType 0 def + /CharStrings 1 dict dup /.notdef () put def + 3 -1 roll pop () currentdict end .buildfont1 exch pop 3 1 roll + } { + pop + } ifelse + } if 1 index dup type /integertype eq { 3 index /Encoding get exch get } if exch .type1execchar |