123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498 |
- languagelevel 2 .setlanguagelevel currentglobal true setglobal
- 25 dict begin
- /.prs_dict currentdict def
- /.prs_empty 0 dict readonly def
- /path_buffer 255 string def
- /name_buffer 255 string def
- /minus (-) 0 get def
- /period (.) 0 get def
- /CMap 10 dict def
- /CIDFont 10 dict def
- /enable_cache true def
- /.prsFile 0 def
- /.prsResult 0 def
- /.prsDictCount 0 def
- /DummyCIDInit 15 dict
- begin
- /begincmap {} def
- /usecmap {pop} bind def
- {stop} bind
- [ /begincodespacerange /endcodespacerange /beginnotdefchar /endnotdefchar
- /beginnotdefrange /endnotdefrange /begincidchar /endcidchar /begincidrange
- /endcidrange /endcmap /usefont /StartData
- ] {
- 1 index def
- } bind forall
- pop
- currentdict end def
- /findresource {
- 2 copy /ProcSet eq exch
- /CIDInit eq and {
- pop pop //DummyCIDInit
- } {
- //findresource exec
- } ifelse
- } bind def
- /StopIfCSIDefined {
-
-
-
-
-
- countdictstack //.prs_dict /.prsDictCount get sub dup {
- currentdict /CIDSystemInfo .knownget {
- //.prs_dict exch /.prsResult exch put
- stop
- } if
- currentdict exch end
- } repeat {
- begin
- } repeat
- } bind def
- /PrescanFile {
- { //.prs_dict /.prsFile get token {
- dup type
- dup /nametype eq exch /operatortype eq or {
- dup xcheck {
- exec
- //StopIfCSIDefined exec
- } if
- } if
- } {
- stop
- } ifelse
- } loop
- } bind odef
- /GetCIDSystemInfoFromFile {
-
-
-
-
-
-
-
- //.prs_dict begin
- /.prsFile exch def
- /.prsResult //.prs_empty def
- /.prsDictCount countdictstack def
- { //PrescanFile } stopped pop
- //.prs_dict /.prsResult get
- end
- } bind def
- /GetCIDSystemInfo {
-
-
-
- 2 copy resourcestatus {
- pop 2 lt {
- findresource /CIDSystemInfo .knownget not {
- //.prs_empty
- } if
- } {
- dup //.prs_dict exch get
- dup 3 index known
- //enable_cache and {
- exch pop exch get
- } {
- 3 1 roll
- /Category findresource begin
- dup //path_buffer ResourceFileName
- end
- currentglobal exch true setglobal
- mark exch
- { (r) file
- //GetCIDSystemInfoFromFile exec
- } stopped {
- cleartomark //.prs_empty
- } {
- exch pop
- } ifelse
- exch setglobal
- dup 4 1 roll
- put
- } ifelse
- } ifelse
- } {
- pop pop //.prs_empty
- } ifelse
- } bind def
- /IsCompatibleCSI {
-
-
-
-
-
- exch
- { dup type /arraytype eq {
- dup length 1 ne {
- pop pop false exit
- } if
- 0 get
- } if
- dup type /dicttype ne {
- pop pop false exit
- } if
- exch
- dup type /dicttype ne {
- pop pop false exit
- } if
- true
- [/Registry /Ordering] {
- 2 index 1 index .knownget not {
- 1234567
- } if
- exch
- 4 index exch .knownget not {
- 7654321
- } if
- eq and
- } forall
- exch pop exch pop
- exit
- } loop
- } bind def
- /IsComposedOK {
-
-
- exch
- /CIDFont //GetCIDSystemInfo exec
- dup type /dicttype eq {
- dup length 0 ne {
- exch
- /CMap //GetCIDSystemInfo exec
- //IsCompatibleCSI exec
- } {
- pop pop false
- } ifelse
- } {
- pop pop false
- } ifelse
- } bind def
- /IsComposedFont {
-
-
-
-
-
- dup type /stringtype ne {
- //name_buffer cvs
- } if
- { dup length 2 sub -1 1 {
-
- 2 copy get dup //minus eq exch //period eq or {
- 2 copy 2 copy
- 2 copy get //minus eq {
- 2 copy 1 sub get //minus eq {
- 1 sub
- } if
- } if
- 0 exch getinterval cvn
- 3 1 roll
- 1 add dup
- 5 index length
- exch sub getinterval cvn
- 2 copy //IsComposedOK exec {
- 4 2 roll pop pop
- stop
- } if
- pop pop pop
- } {
- pop
- } ifelse
- } for
- pop
- } stopped
- } bind def
- /ComposeName {
- dup dup 5 2 roll
- 3 2 roll exch cvs length dup
- 4 -1 roll exch //minus put
- 1 add dup
- 3 index dup length
- 2 index sub
- 3 2 roll
- exch getinterval
- 3 2 roll exch cvs length
- add 0 exch getinterval
- } bind def
- currentpacking false setpacking
- /BindAux {
- 0 exec
- } bind def
- /EnumerateFontNames {
-
-
-
-
-
- end
- {
- 0 1 2 {
- en_local_dict exch /status exch put
- Fonts {
- en_local_dict /status get eq {
- scr cvs
- proc exec
- } {
- pop
- } ifelse
- } forall
- } for
- } stopped
- Category begin
- { stop } if
- } bind def
- setpacking
- /Bind {
-
-
-
-
-
- dup length array copy
- dup length 1 sub -1 0 {
- 2 copy get
- dup dup type /arraytype eq exch xcheck and {
-
- //BindAux exec
- 2 index 3 1 roll put
- } {
- dup dup type /nametype eq exch xcheck and {
-
- currentdict exch .knownget {
- 2 index 3 1 roll put
- } {
- pop
- } ifelse
- } {
- pop pop
- } ifelse
- } ifelse
- } for
- cvx
- } bind def
- //BindAux 0 //Bind put
- /Font /Category findresource dup length dict copy begin
- /FindResource {
- dup //ResourceStatus exec {
- pop pop //FindResource exec
- } {
- dup //IsComposedFont exec {
- exch [ exch ] composefont
- } {
- //FindResource exec
- } ifelse
- } ifelse
- } bind def
- /ResourceStatus {
-
- dup //ResourceStatus exec {
- 3 2 roll pop true
- } {
- //IsComposedFont exec {
- /CMap resourcestatus {
- exch pop exch
- /CIDFont resourcestatus {
- exch pop
- dup 0 ge {
- exch dup 0 ge {
- add
- } {
- exch pop
- } ifelse
- } {
- pop
- } ifelse
- 2 exch true
- } {
- pop pop pop false
- } ifelse
- } {
- pop pop pop false
- } ifelse
- } {
- false
- } ifelse
- } ifelse
- } bind def
- /ResourceForAll {
-
-
-
-
-
-
- currentglobal false setglobal
- 20 dict 20 dict 20 dict
- 4 -1 roll setglobal
-
- 5 index [ 2 index {exch cvn dup put} aload pop ] cvx 5 index //ResourceForAll exec
- (*) [ 3 index {exch cvn dup put} aload pop ] cvx 5 index /CMap resourceforall
- (*) [ 4 index {exch cvn dup put} aload pop ] cvx 5 index /CIDFont resourceforall
-
-
- dup {
- //ResourceStatus exec {
- pop 2 index
- 3 1 roll put
- } {
- pop
- } ifelse
- } forall
-
-
-
- 3 2 roll {
- 3 index {
- 3 1 roll
- 6 index //ComposeName exec
- dup 8 index .stringmatch {
- cvn
- dup 4 index exch known {
- pop pop
- } {
- 2 index
- 4 2 roll
- //IsComposedOK exec {
- exch 2 index exch 2 put
- } {
- exch pop
- } ifelse
- } ifelse
- } {
- pop pop
- } ifelse
- dup
- } forall
- pop pop
- } forall
- exch pop
-
-
-
-
-
-
-
-
- currentdict
- 6 dict begin
- /Category exch def
- /Fonts exch def
- /scr exch def
- /proc exch def
- /en_local_dict currentdict def
- //EnumerateFontNames //Bind exec
- /status 0 def
- end
- exch pop
-
- exec
- } bind def
- currentdict end /Font exch /Category defineresource pop
- end
- setglobal .setlanguagelevel
|