diff options
author | Reinhard Kotucha <reinhard.kotucha@web.de> | 2019-05-10 23:51:26 +0000 |
---|---|---|
committer | Reinhard Kotucha <reinhard.kotucha@web.de> | 2019-05-10 23:51:26 +0000 |
commit | e92598acb3a0a20ac8ff31928d84188de2360b7f (patch) | |
tree | efb05c3dd914979fc62f92be27b52b7d54ef3e9b /Master/tlpkg/tlgs/Resource/Init/gs_type1.ps | |
parent | a0dbdd61992f743553c4c357edf3af0cfc3cd0b9 (diff) |
Upgrade gs-9.26 -> gs-9.27
git-svn-id: svn://tug.org/texlive/trunk@51079 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_type1.ps')
-rw-r--r-- | Master/tlpkg/tlgs/Resource/Init/gs_type1.ps | 103 |
1 files changed, 53 insertions, 50 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps b/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps index 96e1ced240c..6c7735bc0cc 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2018 Artifex Software, Inc. +% Copyright (C) 2001-2019 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -38,7 +38,7 @@ dup .fontbbox { pop pop pop pop dup /FontInfo known not - { .growfontdict dup /FontInfo 2 dict put } + { //.growfontdict exec dup /FontInfo 2 dict put } if dup dup /FontInfo get dup dup /UnderlinePosition known exch /UnderlineThickness known and @@ -90,7 +90,7 @@ { % as luck would have it, we can just replace the "uni" with "16#" % to get something we can convert to a number - pop pop dup 0 (16#) putinterval {cvi} .internalstopped + pop pop dup 0 (16#) putinterval {cvi} //.internalstopped exec { pop //false} { % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname cpoint dup 5 index exch known @@ -116,7 +116,7 @@ { % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname aglname CFFDEBUG { (\nsetting alias: ) print dup ==only ( to be the same as glyph: ) print 1 index //== exec } if - 3 index exch 3 index //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse + 3 index exch 3 index .forceput % scratch(string) RAGL(dict) AGL(dict) CharStrings(dict) cstring gname } {pop} ifelse @@ -135,7 +135,7 @@ 3 1 roll pop pop } if pop - dup /.AGLprocessed~GS //true //.growput systemdict /superexec known {//superexec}{1183615869 internaldict /superexec get exec} ifelse + dup /.AGLprocessed~GS //true .forceput } if %% We need to excute the C .buildfont1 in a stopped context so that, if there @@ -148,34 +148,8 @@ {//.buildfont1} stopped 4 3 roll .setglobal {//.buildfont1 $error /errorname get signalerror} if - } bind def - -% If the diskfont feature isn't included, define a dummy .loadfontdict. -/.loadfontdict where - { pop } - { /.loadfontdict 0 dict readonly def } -ifelse -/.loadfontfile % <file> .loadfontfile - - { mark exch + } .bind executeonly def % hide .forceput - % In order to load fonts reliably, we should push systemdict - % here. However, Ed Taft says that Adobe implementations - % push userdict and nothing else! - % We really would just like systemdict on the stack, - % but fonts produced by Fontographer require a writable dictionary. - % However, we can't use any of the other well-known dictionaries - % (such as userdict), since the whole point of pushing systemdict - % is to make sure that nothing important has been redefined. - 32 dict begin - % We can't just use `run', because we want to check for .PFB files. - currentpacking - { //false setpacking .loadfont1 //true setpacking } - { .loadfont1 } - ifelse - end - { stop } if - cleartomark - } bind def % container for CloseSource flag (default //true to prevent buildup of file handles) /closesourcedict mark /CloseSource //true @@ -190,7 +164,7 @@ ifelse % Since the file might leave garbage on the operand stack, % we have to create a procedure to close the file reliably. dup read not { -1 } if - 2 copy unread 16#80 eq { + 2 copy .unread 16#80 eq { dup //closesourcedict //true /PFBDecode filter cvx exch .currentresourcefile eq { dup /.execasresource .systemvar @@ -203,21 +177,38 @@ ifelse cvx exec } ifelse } stopped -} bind def -% undefine a dict that is only used internally, and is immediately bound -currentdict /closesourcedict .undef +} bind executeonly def -% Here are the BuildChar and BuildGlyph implementation for Type 1 fonts. -% The names %Type1BuildChar and %Type1BuildGlyph are known to the interpreter. -% The real work is done in an operator: -% <font> <code|name> <name> <charstring> .type1execchar - +% If the diskfont feature isn't included, define a dummy .loadfontdict. +/.loadfontdict where + { pop } + { /.loadfontdict 0 dict readonly def } +ifelse +/.loadfontfile % <file> .loadfontfile - + { mark exch + + % In order to load fonts reliably, we should push systemdict + % here. However, Ed Taft says that Adobe implementations + % push userdict and nothing else! + % We really would just like systemdict on the stack, + % but fonts produced by Fontographer require a writable dictionary. + % However, we can't use any of the other well-known dictionaries + % (such as userdict), since the whole point of pushing systemdict + % is to make sure that nothing important has been redefined. + 32 dict begin + % We can't just use `run', because we want to check for .PFB files. + currentpacking + { //false setpacking //.loadfont1 exec //true setpacking } + { //.loadfont1 exec } + ifelse + end + { stop } if + cleartomark + } bind def +% undefine stuff that is only used internally, and is immediately bound +currentdict /closesourcedict .undef +currentdict /.loadfont1 .undef -(%Type1BuildChar) cvn { % <font> <code> %Type1BuildChar - - 1 index /Encoding get 1 index get .type1build .type1execchar -} bind def -(%Type1BuildGlyph) cvn { % <font> <name> %Type1BuildGlyph - - dup .type1build .type1execchar -} bind def % Note: this procedure is used for both Type 1 and Type 2 fonts. /.type1build { % <font> <code|name> <name> .type1build % <font> <code|name> <name> <charstring> @@ -236,6 +227,18 @@ currentdict /closesourcedict .undef end } bind def +% Here are the BuildChar and BuildGlyph implementation for Type 1 fonts. +% The names %Type1BuildChar and %Type1BuildGlyph are known to the interpreter. +% The real work is done in an operator: +% <font> <code|name> <name> <charstring> .type1execchar - + +(%Type1BuildChar) cvn { % <font> <code> %Type1BuildChar - + 1 index /Encoding get 1 index get //.type1build exec .type1execchar +} bind executeonly def +(%Type1BuildGlyph) cvn { % <font> <name> %Type1BuildGlyph - + dup //.type1build exec .type1execchar +} bind executeonly def + 1183615869 internaldict begin % CCRun is an undocumented procedure provided for Type 4 and Type 0 fonts. % Apparently there are two different argument lists for CCRun. @@ -294,10 +297,10 @@ buildfontdict 4 /.buildfont4 cvx put /.buildfont2 where not { (%END2) .skipeof } if pop (%Type2BuildChar) cvn { % <font> <code> %Type2BuildChar - - 1 index /Encoding get 1 index get .type1build .type2execchar -} bind def + 1 index /Encoding get 1 index get //.type1build exec .type2execchar +} bind executeonly def (%Type2BuildGlyph) cvn { % <font> <name> %Type2BuildGlyph - - dup .type1build .type2execchar -} bind def + dup //.type1build exec .type2execchar +} bind executeonly def buildfontdict 2 /.buildfont2 cvx put %END2 |