home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEPLOY / USER.Z / Level2CID < prev    next >
Text File  |  1996-09-09  |  14KB  |  294 lines

  1. %!PS-Adobe-3.0 Resource-File
  2. %%BeginResource: file (FS/Level2CID)
  3. %%Title: (FS/Level2CID)
  4. %%Version: 0.402
  5. %%Copyright: ------------------------------------------------------------
  6. %%Copyright: Copyright 1990-1994 Adobe Systems Incorporated.
  7. %%Copyright: All rights reserved.
  8. %%Copyright:
  9. %%Copyright: Patents Pending
  10. %%Copyright:
  11. %%Copyright: NOTICE: All information contained herein is the property
  12. %%Copyright: of Adobe Systems Incorporated. Many of the intellectual
  13. %%Copyright: and technical concepts contained herein are proprietary
  14. %%Copyright: to Adobe, are protected as trade secrets, and are made
  15. %%Copyright: available only to Adobe licensees for their internal use.
  16. %%Copyright: Any reproduction or dissemination of this software is
  17. %%Copyright: strictly forbidden unless prior written permission is
  18. %%Copyright: obtained from Adobe.
  19. %%Copyright:
  20. %%Copyright: PostScript and Display PostScript are trademarks of
  21. %%Copyright: Adobe Systems Incorporated which may be registered in
  22. %%Copyright: certain jurisdictions.
  23. %%Copyright: ------------------------------------------------------------
  24. %%EndComments
  25. lib_extensions begin true lib_vmSaveState false lib_packingSaveState end
  26. userdict begin/$PGFKeys{//systemdict/globaldict get/$PGFKeys get}bind
  27. executeonly def end 
  28. globaldict begin
  29.  
  30.    /cid_FS_SCRATCH 256 string def
  31.  
  32.    /getresfilename
  33.       {
  34.       /Category lib_findresource
  35.          begin
  36.          cid_FS_SCRATCH ResourceFileName
  37.          end
  38.       } bind executeonly def
  39.    /cid_getresfilename //getresfilename def
  40.  
  41.    /execresfile { getresfilename run } bind executeonly def
  42.    /cid_execresfile //execresfile def
  43.  
  44.    globaldict /raise known not
  45.       {
  46.       /FSops1 true def
  47.       /raise
  48.          { //systemdict /errordict get exch get exec } bind def
  49.       }
  50.    if
  51.    globaldict /reraise known not
  52.       {
  53.       /FSops2 true def
  54.       /reraise
  55.          {
  56.          cvx //systemdict /$error get /errorname get
  57.          dup null eq { pop /undefined } if
  58.          //systemdict /errordict get exch get exec
  59.          } bind def
  60.       }
  61.    if
  62.    globaldict /clearerror known not
  63.       {
  64.       /FSops3 true def
  65.       /clearerror
  66.          { //systemdict /$error get /newerror //false put } bind def
  67.       }
  68.    if
  69.      
  70.    % redefine resource categories in global vm (not per context)
  71.    
  72.    /Generic /Category lib_findresource
  73.    /FindResource get /generic_FindResource exch def
  74.    
  75.    /Font /Category lib_findresource
  76.    dup /ResourceStatus get /cid_oldResourceStatus exch def
  77.    dup 
  78.    /FindResource 
  79.    get /cid_oldFindResource exch def
  80.   /ResourceForAll get /cid_oldResourceForAll exch def
  81.   globaldict 
  82.   /__CID_Font_Res_Init 
  83. known 
  84. not 
  85. {
  86.     /Font /Category lib_findresource 
  87.     dup length dict copy 
  88.     dup /ResourceStatus
  89.     {dup //cid_oldResourceStatus
  90.     exec dup{4 -1 roll pop}{lib_extensions begin true lib_vmSaveState end pop
  91.     cid_extensions begin cid_IsComposedFont end{pop pop pop 2 -1 true}{pop false}
  92.     ifelse lib_extensions begin lib_vmRestoreState end}ifelse}bind executeonly put
  93.     dup
  94.     /FindResource
  95.     {dup//FontDirectory exch known{//FontDirectory exch get}{
  96.     lib_extensions begin false lib_vmSaveState end
  97.     cid_extensions begin
  98.     cid_IsComposedFont end{/CIDInit/ProcSet lib_findresource begin 1 index
  99.     /FDepVector cid_FindFixEntry{0 exch exec}{cid_composefont}ifelse end
  100.     lib_extensions begin lib_vmRestoreState end}{lib_extensions begin
  101.     lib_vmRestoreState end//cid_oldFindResource exec}ifelse}ifelse}bind
  102.     executeonly put dup
  103.     /ResourceForAll{
  104.     lib_extensions begin 3 copy/lib_s1 exch def
  105.     /lib_s2 exch def/lib_s3 exch def end//cid_oldResourceForAll exec
  106.     lib_extensions begin/lib_dstr5(fonts/)lib_Strcpy lib_s3 lib_Strcat lib_Strget
  107.     /lib_s2 load lib_s1 false end 
  108.     cid_extensions /cid_CIDKeyedFontsForall get exec
  109.     }
  110.     bind executeonly put
  111. %    lib_extensions begin
  112. %        /Font lib_SaveVMInstances 
  113. %    end
  114.     /Font exch /Category lib_defineresource pop 
  115. %    lib_extensions begin
  116. %        /Font lib_RestoreVMInstances 
  117. %    end 
  118. /Generic/Category
  119. lib_findresource dup length 2 add dict copy dup/InstanceType/dicttype put
  120. /CompatibleCIDFont exch/Category lib_defineresource pop/Generic/Category
  121. lib_findresource dup length 2 add dict copy dup/InstanceType/dicttype put dup
  122. /FindResource{dup FontDirectory exch known{FontDirectory exch get}{dup mark
  123. exch lib_extensions begin false lib_vmSaveState/lib_dstr9 exch lib_Strcpy
  124. lib_Strget end(CompatibleFont/)cid_AppendName cid_PrependRoot dup status{pop
  125. pop pop pop{run}stopped cleartomark FontDirectory exch 2 copy known{get}{exch
  126. pop//cid_oldFindResource exec}ifelse}{cleartomark//cid_oldFindResource exec}
  127. ifelse lib_extensions begin lib_vmRestoreState end}ifelse}bind executeonly put
  128. /CompatibleFont exch/Category lib_defineresource pop currentdict
  129. /cid_oldResourceStatus undef currentdict/cid_oldFindResource undef currentdict
  130. /cid_oldResourceForAll undef/ProcSet/Category lib_findresource dup
  131. /ResourceStatus get/cid_oldResourceStatus exch def dup length 1 add dict copy
  132. dup/ResourceStatus{dup/CIDInit eq{/AdobeTypeComposer/ProcSet resourcestatus{
  133. pop pop pop false}{//cid_oldResourceStatus exec}ifelse}{
  134. //cid_oldResourceStatus exec}ifelse}bind executeonly put lib_extensions
  135. /lib_nativeMode get{pop}{lib_extensions begin/ProcSet lib_SaveVMInstances end
  136. /ProcSet exch/Category lib_defineresource pop lib_extensions begin/ProcSet
  137. lib_RestoreVMInstances end}ifelse/Generic/Category lib_findresource dup length
  138. 2 add dict copy dup/ResourceFileName{{pop(fsupp/)cid_AppendName
  139. cid_PrependRoot exch pop}stopped{/ResourceFileName//reraise exec}if}bind
  140. executeonly put/FSupp exch/Category lib_defineresource pop/Generic/Category
  141. lib_findresource dup length 2 add dict copy dup/ResourceFileName{{pop
  142. (pgfsupp/)cid_AppendName cid_PrependRoot exch pop}stopped{/ResourceFileName
  143. //reraise exec}if}bind executeonly put/PGFSupp exch/Category
  144. lib_defineresource pop/Generic/Category lib_findresource dup length 2 add dict
  145. copy dup/ResourceFileName{{pop(Sys/)cid_AppendName cid_PrependRoot exch pop}
  146. stopped{/ResourceFileName//reraise exec}if}bind executeonly put/Sys exch
  147. /Category lib_defineresource pop/Generic/Category lib_findresource dup length
  148. 2 add dict copy dup/ResourceFileName{{pop(cdevprocs/)cid_AppendName
  149. cid_PrependRoot exch pop}stopped{/ResourceFileName//reraise exec}if}bind
  150. executeonly put/CDevProc exch/Category lib_defineresource pop/Generic/Category
  151. lib_findresource dup length 2 add dict copy dup/InstanceType/dicttype put dup
  152. /ResourceFileName{{pop(charstrings/)cid_AppendName cid_PrependRoot exch pop}
  153. stopped{/ResourceFileName//reraise exec}if}bind executeonly put/Charstring
  154. exch/Category lib_defineresource pop/Generic/Category lib_findresource dup
  155. length 2 add dict copy dup/InstanceType/dicttype put dup/ResourceFileName{{pop
  156. (pgfonts/)cid_AppendName cid_PrependRoot exch pop}stopped{/ResourceFileName
  157. //reraise exec}if}bind executeonly put/PGFont exch/Category lib_defineresource
  158. pop lib_extensions/lib_nativeMode get not{/Generic/Category lib_findresource
  159. dup length 2 add dict copy dup/InstanceType/dicttype put/CMap exch/Category
  160. lib_defineresource pop}if/Generic/Category lib_findresource dup length 2 add
  161. dict copy dup/InstanceType/dicttype put/FixCMapCategory exch/Category
  162. lib_defineresource pop/Generic/Category lib_findresource dup length 2 add dict
  163. copy dup/InstanceType/dicttype put/FixCIDInitProcSet exch/Category
  164. lib_defineresource pop lib_extensions/lib_nativeMode get not{/Generic/Category
  165. lib_findresource dup length 2 add dict copy dup/InstanceType/dicttype put
  166. /CIDFont exch/Category lib_defineresource pop}if userdict/EncodingDirectory
  167. known{userdict/EncodingDirectory get gcheck}{true}ifelse{currentglobal//false
  168. setglobal userdict/EncodingDirectory 32 dict put setglobal}if/Generic/Category
  169. lib_findresource dup length 2 add dict copy dup/InstanceType/arraytype put dup
  170. /ResourceFileName{{pop(encodings/)cid_AppendName cid_PrependRoot exch pop}
  171. stopped{/ResourceFileName//reraise exec}if}bind executeonly put dup dup begin
  172. /FindResource{currentglobal exch//generic_FindResource stopped{dup mark exch{userdict
  173. /EncodingDirectory get 1 index get dup gcheck setglobal/Encoding
  174. lib_defineresource exch pop exch pop//clearerror exec}stopped{cleartomark exch
  175. setglobal/FindResource cvx/undefinedresource//raise exec}if}if exch setglobal}
  176. end bind executeonly put lib_extensions begin/Encoding lib_SaveVMInstances end
  177. /Encoding exch/Category lib_defineresource pop lib_extensions begin/Encoding
  178. lib_RestoreVMInstances end systemdict/findpgfont known not globaldict
  179. /findpgfont known not and{userdict/PGFontDirectory known not{currentglobal
  180. //false setglobal userdict/PGFontDirectory 32 dict put setglobal}if/findpgfont
  181. {lib_extensions begin true lib_vmSaveState end dup/PGFont{lib_findresource}
  182. stopped{true setglobal pop dup type/savetype eq{restore pop pop pop}if
  183. userdict/PGFontDirectory get exch known{dup userdict/PGFontDirectory get exch
  184. get dup gcheck setglobal/PGFont lib_defineresource lib_extensions begin
  185. lib_vmRestoreState end//clearerror exec}{lib_extensions begin
  186. lib_vmRestoreState end/invalidfont//raise exec}ifelse}{exch pop lib_extensions
  187. begin lib_vmRestoreState end}ifelse}bind executeonly def}if systemdict
  188. /findcharstrings known not globaldict/findcharstrings known not and{userdict
  189. /CharStringsDirectory known not{currentglobal//false setglobal userdict
  190. /CharStringsDirectory 32 dict put setglobal}if/findcharstrings{currentglobal
  191. exch//false setglobal dup/Charstring{lib_findresource}stopped{//false
  192. setglobal pop userdict/CharStringsDirectory get exch known{dup userdict
  193. /CharStringsDirectory get exch get dup gcheck setglobal/Charstring
  194. lib_defineresource exch setglobal//clearerror exec}{exch setglobal/Charstring
  195. stop}ifelse}{exch pop exch setglobal}ifelse}bind executeonly def}if userdict
  196. /CDevProcDirectory known not{currentglobal false setglobal userdict
  197. /CDevProcDirectory 32 dict put true setglobal userdict/CDevProcDirectory get
  198. /StandardCDevProc 1183615869 internaldict dup/stdCDevProc known{/stdCDevProc
  199. get}{pop{pop pop pop pop 0 exch -1000 exch 2 div 880}bind}ifelse put userdict
  200. /CDevProcDirectory get/StandardCDevProc get/StandardCDevProc exch/CDevProc
  201. lib_defineresource pop setglobal}if systemdict/findcdevproc known not
  202. globaldict/findcdevproc known not and userdict/findcdevproc known not and{
  203. /findcdevproc{currentglobal exch true setglobal dup/CDevProc{lib_findresource}
  204. stopped{true setglobal pop userdict/CDevProcDirectory get exch known{dup
  205. userdict/CDevProcDirectory get exch get dup gcheck setglobal/CDevProc
  206. lib_defineresource exch setglobal//clearerror exec}{exch setglobal/CDevProc
  207. stop}ifelse}{exch pop exch setglobal}ifelse}bind executeonly def}if
  208. /NominalJISEncoding/Encoding resourcestatus{pop pop}{[/c00/c01/c02/c03/c04/c05
  209. /c06/c07/c08/c09/c0A/c0B/c0C/c0D/c0E/c0F/c10/c11/c12/c13/c14/c15/c16/c17/c18
  210. /c19/c1A/c1B/c1C/c1D/c1E/c1F/c20/c21/c22/c23/c24/c25/c26/c27/c28/c29/c2A/c2B
  211. /c2C/c2D/c2E/c2F/c30/c31/c32/c33/c34/c35/c36/c37/c38/c39/c3A/c3B/c3C/c3D/c3E
  212. /c3F/c40/c41/c42/c43/c44/c45/c46/c47/c48/c49/c4A/c4B/c4C/c4D/c4E/c4F/c50/c51
  213. /c52/c53/c54/c55/c56/c57/c58/c59/c5A/c5B/c5C/c5D/c5E/c5F/c60/c61/c62/c63/c64
  214. /c65/c66/c67/c68/c69/c6A/c6B/c6C/c6D/c6E/c6F/c70/c71/c72/c73/c74/c75/c76/c77
  215. /c78/c79/c7A/c7B/c7C/c7D/c7E/c7F/c80/c81/c82/c83/c84/c85/c86/c87/c88/c89/c8A
  216. /c8B/c8C/c8D/c8E/c8F/c90/c91/c92/c93/c94/c95/c96/c97/c98/c99/c9A/c9B/c9C/c9D
  217. /c9E/c9F/cA0/cA1/cA2/cA3/cA4/cA5/cA6/cA7/cA8/cA9/cAA/cAB/cAC/cAD/cAE/cAF/cB0
  218. /cB1/cB2/cB3/cB4/cB5/cB6/cB7/cB8/cB9/cBA/cBB/cBC/cBD/cBE/cBF/cC0/cC1/cC2/cC3
  219. /cC4/cC5/cC6/cC7/cC8/cC9/cCA/cCB/cCC/cCD/cCE/cCF/cD0/cD1/cD2/cD3/cD4/cD5/cD6
  220. /cD7/cD8/cD9/cDA/cDB/cDC/cDD/cDE/cDF/cE0/cE1/cE2/cE3/cE4/cE5/cE6/cE7/cE8/cE9
  221. /cEA/cEB/cEC/cED/cEE/cEF/cF0/cF1/cF2/cF3/cF4/cF5/cF6/cF7/cF8/cF9/cFA/cFB/cFC
  222. /cFD/cFE/cFF]/NominalJISEncoding exch/Encoding lib_defineresource pop}ifelse
  223. globaldict/FSops1 known{globaldict/raise undef globaldict/FSops1 undef}if
  224. globaldict/FSops2 known{globaldict/reraise undef globaldict/FSops2 undef}if
  225. globaldict/FSops3 known{globaldict/clearerror undef globaldict/FSops3 undef}if
  226. globaldict /__CID_Font_Res_Init true put }
  227.   {
  228.    % define some stuff in userdict needed for every context
  229.    userdict /EncodingDirectory known
  230.       { userdict /EncodingDirectory get gcheck }
  231.       { true }
  232.    ifelse
  233.       {
  234.       currentglobal
  235.       //false
  236.       setglobal
  237.       userdict /EncodingDirectory 32 dict put 
  238.       setglobal
  239.       }
  240.    if
  241.    userdict/PGFontDirectory known not
  242.          {
  243.          currentglobal
  244.          //false
  245.          setglobal
  246.          userdict /PGFontDirectory 32 dict put 
  247.          setglobal
  248.          }
  249.       if
  250.     userdict/CharStringsDirectory known not
  251.          {
  252.          currentglobal
  253.          //false
  254.          setglobal
  255.          userdict /CharStringsDirectory 32 dict put 
  256.          setglobal
  257.          }
  258.       if
  259.  
  260.    userdict /CDevProcDirectory known not
  261.       {
  262.       currentglobal false setglobal
  263.       userdict /CDevProcDirectory 32 dict put 
  264.       true setglobal
  265.       userdict /CDevProcDirectory get /StandardCDevProc
  266.       1183615869 internaldict dup /stdCDevProc known
  267.          { /stdCDevProc get }
  268.          { pop { pop pop pop pop 0 exch -1000 exch 2 div 880 } bind }
  269.       ifelse put
  270.       userdict /CDevProcDirectory get /StandardCDevProc get
  271.       /StandardCDevProc exch /CDevProc lib_defineresource pop
  272.       setglobal
  273.       }
  274.    if
  275.   } 
  276.   ifelse
  277. end 
  278.  
  279. userdict begin/RD{string currentfile exch readstring pop}bind executeonly
  280. def/ND{noaccess def}bind executeonly def/NP{noaccess put}bind executeonly def
  281. /-|/RD load def/|-/ND load def/|/NP load def end userdict begin/substfontdict
  282. 9 dict def substfontdict/subst{/b exch def/a exch def/str exch cvlit def str a
  283. search{/newstr b length a length sub str length add string def newstr copy
  284. length/cnt exch def pop newstr cnt b putinterval/cnt cnt b length add def
  285. newstr exch cnt exch putinterval newstr//true}{//false}ifelse}bind readonly
  286. put $error dup begin/SubstituteFont{//substfontdict begin currentglobal//true
  287. setglobal mark 2 index{dup length string cvs(-Ext-SJ-)(-Ext-RKSJ-)subst not{
  288. stop}if cvn}stopped{cleartomark $error/newerror//false put setglobal end
  289. //SubstituteFont exec}{exch pop exch setglobal exch pop end}ifelse}end bind
  290. readonly put userdict/substfontdict undef end lib_extensions begin
  291. lib_vmRestoreState lib_packingRestoreState end
  292. %%EndResource
  293. %%EOF
  294.