summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps
diff options
context:
space:
mode:
Diffstat (limited to 'Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps')
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps47
1 files changed, 30 insertions, 17 deletions
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps
index 74f1446bcd5..80b8008cf30 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.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
@@ -52,12 +52,14 @@
% FDArray.
dup 0 {
- 9 .checkfonttype {
+ 9 //.checkfonttype exec {
/CIDInit /ProcSet findresource begin
.completefont9
end
} if
- 1 index exch .buildfont9 exch pop
+ 1 index exch .buildfont9
+ .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
+ exch pop
} put % Don't bind it here, because gs_fapi.ps redefines .buildfont9
% Add entries to a new CIDFontType 0 font per documentation (FontMatrix)
@@ -137,15 +139,19 @@ dup 0 {
% ------ CIDFontType 1 (FontType 10) ------ %
dup 1 {
- 10 .checkfonttype pop
- 1 index exch .buildfont10 exch pop
+ 10 //.checkfonttype exec pop
+ 1 index exch .buildfont10
+ .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
+ exch pop
} put % Don't bind it here because gs_fapi.ps redefines .buildfont10
% ------ CIDFontType 2 (FontType 11) ------ %
dup 2 {
- 11 .checkfonttype pop
- 1 index exch .buildfont11 exch pop
+ 11 //.checkfonttype exec pop
+ 1 index exch .buildfont11
+ .currentresourcefile dup type /filetype eq { //.filename {1 index exch /ResourcePath exch put} if }{ pop} ifelse
+ exch pop
} put % Don't bind it here because gs_fapi.ps redefines .buildfont11
pop % .cidfonttypes
@@ -172,7 +178,7 @@ pop % .cidfonttypes
exch pop {stop}if
}if
currentfile fileposition
- } .internalstopped {
+ } //.internalstopped exec {
% File is not positionable, or uses hex data.
% Load the data now.
cleartomark exch
@@ -282,7 +288,7 @@ currentdict end
/.readglyphdata {
currentfont exch .type9mapcid
FDArray exch get exch
-} bind def
+} bind executeonly def
% BuildGlyph procedure for CIDFontType 0.
% The name %Type9BuildGlyph is known to the interpreter.
@@ -290,9 +296,9 @@ currentdict end
(%Type9BuildGlyph) cvn { % <cidfont> <cid> %Type9BuildGlyph -
.currentglobal 3 1 roll 1 index gcheck .setglobal
1 index begin
- dup .readglyphdata dup //null eq {
+ dup //.readglyphdata exec dup //null eq {
% Substitute CID 0. **** WRONG ****
- pop pop 0 .readglyphdata
+ pop pop 0 //.readglyphdata exec
} if
% Stack: cidfont cid subfont charstring
dup //null eq { pop pop pop pop } { %**** WRONG ****
@@ -302,7 +308,7 @@ currentdict end
} ifelse %**** WRONG ****
end
.setglobal
-} bind def
+} bind executeonly def
% ------ CIDFontType 2 ------ %
@@ -310,12 +316,12 @@ currentdict end
% The name %Type11BuildGlyph is known to the interpreter.
(%Type11BuildGlyph) cvn { % <cidfont> <cid> %Type11BuildGlyph -
% We must be prepared for out-of-range CIDs.
- 2 copy { .type11mapcid } .internalstopped {
+ 2 copy { .type11mapcid } //.internalstopped exec {
pop /CharStrings get /.notdef get
} if
% Stack: cidfont cid glyphindex
1 index exch .type42execchar
-} bind def
+} bind executeonly def
% ---------------- Define resources ---------------- %
@@ -346,7 +352,7 @@ languagelevel exch 2 .setlanguagelevel
/ProvideUnicodeDecoding get exec
} if
dup /CIDFontType get //.cidfonttypes exch get exec
-} odef
+} bind executeonly odef
/CIDFont /Generic /Category findresource dup length dict .copydict
dup /InstanceType /dicttype put
@@ -371,9 +377,9 @@ dup /DefineResource {
} bind def
dup /.LoadResource {
currentglobal {
- .loadcidfontresource
+ //.loadcidfontresource exec
} {
- //true setglobal {.loadcidfontresource} stopped //false setglobal {stop} if
+ //true setglobal {//.loadcidfontresource exec} stopped //false setglobal {stop} if
} ifelse
} bind put
@@ -411,3 +417,10 @@ dup /.CheckResource {
%% Replace 1 (gs_ciddc.ps)
(gs_ciddc.ps) runlibfile
+
+% Undef these, not needed outside this file
+[
+ /.checkfonttype
+ /.loadcidfontresource
+ /.readglyphdata
+] {systemdict exch .forceundef} forall