home *** CD-ROM | disk | FTP | other *** search
/ Apollo 18: The Moon Missions / 990125_1647.ISO / Acrobat / WIN95 / ARCHIVE.Z / AcroRd32.exe / PSPROCSET / 14 < prev    next >
Text File  |  1997-06-16  |  10KB  |  610 lines

  1. %%BeginFile: makeocf.prc
  2. %%Copyright: Copyright 1987-1997 Adobe Systems Incorporated. All Rights Reserved.
  3. PDFText begin
  4. PDF /PDFMakeOCF 25 dict dup begin put
  5. /CIDFONT_MAX_STRING_SIZE 8000 def
  6. /_mkocfString100 100 string def
  7. /pdf_BuildCharDict 15 dict dup begin
  8. /dst_string 1500 string def
  9. /nullstring () def
  10. end def
  11. /pdf_raise {exch cvx exch errordict exch get exec stop} bind def
  12. /pdf_reraise
  13. { cvx $error /errorname get (Error: ) print dup (                    ) cvs print
  14. errordict exch get exec stop
  15. } bind def
  16. /pdf_cvnsi
  17. {
  18. 1 index add 1 sub 1 exch 0 4 1 roll
  19. {
  20. 2 index exch get
  21. exch 8 bitshift
  22. add
  23. }
  24. for
  25. exch pop
  26. } bind def
  27. /pdf_GetInterval
  28. {
  29. pdf_BuildCharDict begin
  30. /dst_index 0 def
  31. dup /dst_string length gt
  32. {dup string /dst_string exch def}
  33. if
  34. 1 index CIDFONT_MAX_STRING_SIZE idiv
  35. /arrayIndex exch def
  36. 2 index arrayIndex get
  37. 2 index
  38. arrayIndex CIDFONT_MAX_STRING_SIZE mul
  39. sub
  40. {
  41. dup 3 index add 2 index length le
  42. {
  43. 2 index getinterval
  44. dst_string dst_index 2 index putinterval
  45. length dst_index add /dst_index exch def
  46. exit
  47. }
  48. {
  49. 1 index length 1 index sub
  50. dup 4 1 roll
  51. getinterval
  52. dst_string dst_index 2 index putinterval
  53. pop dup dst_index add /dst_index exch def
  54. sub
  55. /arrayIndex arrayIndex 1 add def
  56. 2 index dup length arrayIndex gt
  57. {
  58. arrayIndex get
  59. }
  60. {
  61. pop
  62. exit
  63. }
  64. ifelse
  65. 0
  66. }
  67. ifelse
  68. } loop
  69. pop pop pop
  70. dst_string 0 dst_index getinterval
  71. end
  72. } bind def
  73. Level2?
  74. {
  75. /CIDFont /Category resourcestatus
  76. { pop pop }
  77. {
  78. currentglobal true setglobal
  79. /Generic /Category findresource
  80. dup length dict copy
  81. dup /InstanceType /dicttype put
  82. /CIDFont exch /Category defineresource pop
  83. setglobal
  84. } ifelse
  85. pdf_has_composefont?
  86. {
  87. /CIDInit /ProcSet findresource begin
  88. 12 dict begin
  89. begincmap
  90. /CIDSystemInfo 3 dict dup begin
  91. /Registry (Adobe) def
  92. /Ordering (Identity) def
  93. /Supplement 0 def
  94. end def
  95. /CMapName /pdf_Identity def
  96. /CMapVersion 1.000 def
  97. /CMapType 1 def
  98. 1 begincodespacerange
  99. <0000> <FFFF>
  100. endcodespacerange
  101. 1 begincidrange
  102. <0000> <FFFF> 0
  103. endcidrange
  104. endcmap
  105. CMapName currentdict /CMap defineresource pop
  106. end
  107. end
  108. %%EndResource
  109. %%EOF
  110. }
  111. if
  112. }
  113. {
  114. /pdf_Category 2 dict begin
  115. /CIDFont 10 dict def
  116. /ProcSet 2 dict def
  117. currentdict
  118. end
  119. def
  120. /defineresource
  121. {
  122. pdf_Category 1 index 2 copy known
  123. {
  124. get
  125. 3 index 3 index put
  126. pop exch pop
  127. }
  128. {
  129. pop pop
  130. /defineresource /undefined pdf_raise
  131. }
  132. ifelse
  133. } bind def
  134. /findresource
  135. {
  136. pdf_Category 1 index 2 copy known
  137. {
  138. get
  139. 2 index 2 copy known
  140. { get 3 1 roll pop pop}
  141. { pop pop /findresource /undefinedresource pdf_raise }
  142. ifelse
  143. }
  144. {
  145. pop pop
  146. /findresource /undefined pdf_raise
  147. }
  148. ifelse
  149. } bind def
  150. /resourcestatus
  151. {
  152. pdf_Category 1 index 2 copy known
  153. {
  154. get
  155. 2 index known
  156. exch pop exch pop
  157. }
  158. {
  159. pop pop
  160. /findresource /undefined pdf_raise
  161. }
  162. ifelse
  163. } bind def
  164. }
  165. ifelse
  166. /pdf_CIDInit 2 dict begin
  167. /pdf_cidfont_stream_init
  168. {
  169. {
  170. dup (Binary) eq
  171. {
  172. pop
  173. null
  174. currentfile
  175. Level2?
  176. {
  177. { cid_BYTE_COUNT () /SubFileDecode filter }
  178. stopped
  179. { pop pop pop }
  180. if
  181. }
  182. if
  183. /readstring load
  184. exit
  185. }
  186. if
  187. dup (Hex) eq
  188. {
  189. pop
  190. currentfile
  191. Level2?
  192. {
  193. { null exch /ASCIIHexDecode filter /readstring }
  194. }
  195. stopped
  196. { pop exch pop (>) exch /readhexstring }
  197. if
  198. { (>) exch /readhexstring }
  199. ifelse
  200. load
  201. exit
  202. }
  203. if
  204. /StartData /typecheck pdf_raise
  205. }
  206. loop
  207. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE le
  208. {
  209. 2 copy cid_BYTE_COUNT string exch exec
  210. pop
  211. 1 array dup
  212. 3 -1 roll
  213. 0 exch put
  214. }
  215. {
  216. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE div ceiling cvi
  217. dup array exch 2 sub 0 exch 1 exch
  218. {
  219. 2 copy
  220. 5 index
  221. CIDFONT_MAX_STRING_SIZE
  222. string
  223. 6 index exec
  224. pop
  225. put
  226. pop
  227. }
  228. for
  229. 2 index
  230. cid_BYTE_COUNT CIDFONT_MAX_STRING_SIZE mod string
  231. 3 index exec
  232. pop
  233. 1 index exch
  234. 1 index length 1 sub
  235. exch put
  236. }
  237. ifelse
  238. cid_CIDFONT exch /GlyphData exch put
  239. 2 index null eq
  240. {
  241. pop pop pop
  242. }
  243. {
  244. pop /readstring load
  245. 1 string exch
  246. {
  247. 3 copy exec
  248. pop
  249. dup length 0 eq
  250. {
  251. pop pop pop pop pop
  252. true exit
  253. }
  254. if
  255. 4 index
  256. eq
  257. {
  258. pop pop pop pop
  259. false exit
  260. }
  261. if
  262. }
  263. loop
  264. pop
  265. }
  266. ifelse
  267. } bind def
  268. /StartData
  269. {
  270. mark
  271. {
  272. currentdict
  273. dup /CDevProc known not
  274. {
  275. /CDevProc
  276. 1183615869 internaldict /stdCDevProc 2 copy known
  277. { get }
  278. {
  279. pop pop
  280. {pop pop pop pop pop 0 -1000 7 index 2 div 880 }
  281. }
  282. ifelse
  283. def
  284. } if
  285. /cid_temp 15 dict def
  286. cid_temp
  287. begin
  288. /cid_CIDFONT exch def
  289. 3 copy pop
  290. dup /cid_BYTE_COUNT exch def 0 gt
  291. {
  292. pdf_cidfont_stream_init
  293. FDArray
  294. {
  295. /Private get
  296. dup /SubrMapOffset known
  297. {
  298. begin
  299. /Subrs SubrCount array def
  300. Subrs
  301. SubrMapOffset
  302. SubrCount
  303. SDBytes
  304. Level2?
  305. {
  306. currentdict dup /SubrMapOffset undef
  307. dup /SubrCount undef
  308. /SDBytes undef
  309. }
  310. if
  311. end
  312. /cid_SD_BYTES exch def
  313. /cid_SUBR_COUNT exch def
  314. /cid_SUBR_MAP_OFFSET exch def
  315. /cid_SUBRS exch def
  316. cid_SUBR_COUNT 0 gt
  317. {
  318. GlyphData cid_SUBR_MAP_OFFSET cid_SD_BYTES pdf_GetInterval
  319. 0 cid_SD_BYTES pdf_cvnsi
  320. 0 1 cid_SUBR_COUNT 1 sub
  321. {
  322. exch 1 index
  323. 1 add
  324. cid_SD_BYTES mul cid_SUBR_MAP_OFFSET add
  325. GlyphData exch cid_SD_BYTES pdf_GetInterval
  326. 0 cid_SD_BYTES pdf_cvnsi
  327. cid_SUBRS 4 2 roll
  328. GlyphData exch
  329. 4 index
  330. 1 index
  331. sub
  332. pdf_GetInterval
  333. dup length string copy put
  334. }
  335. for
  336. pop
  337. }
  338. if
  339. }
  340. { pop }
  341. ifelse
  342. }
  343. forall
  344. }
  345. if
  346. cleartomark pop pop
  347. end
  348. CIDFontName currentdict /CIDFont
  349. defineresource pop
  350. end end
  351. }
  352. stopped
  353. { cleartomark /StartData pdf_reraise }
  354. if
  355. } bind def
  356. currentdict
  357. end
  358. def
  359. /pdf_saveCIDInit
  360. {
  361. /CIDInit /ProcSet 2 copy resourcestatus
  362. {
  363. pop pop
  364. findresource
  365. pdf_has_composefont?
  366. { pop null }
  367. {
  368. /CIDInit pdf_CIDInit /ProcSet defineresource pop
  369. } ifelse
  370. }
  371. {
  372. pop pop
  373. /CIDInit pdf_CIDInit /ProcSet defineresource pop
  374. null
  375. }
  376. ifelse
  377. PDFVars exch /_pdf_oldCIDInit exch put
  378. } bind def
  379. /pdf_restoreCIDInit
  380. {
  381. PDFVars /_pdf_oldCIDInit get null ne
  382. {
  383. /CIDInit _pdf_oldCIDInit /ProcSet defineresource
  384. }
  385. if
  386. } bind def
  387. /pdf_BuildCharVM
  388. {
  389. %% set up vm state
  390. {
  391. PDFMakeOCF begin
  392. 1 index begin
  393. CIDFont begin
  394. pdf_BuildCharDict begin
  395. /pdf_dfCharCode exch def
  396. /pdf_dfDict exch def
  397. CIDFirstByte pdf_dfCharCode add
  398. dup CIDCount ge
  399. { pop 0 }
  400. if
  401. /cid exch def
  402. {
  403. /cidMapOffset cid GDBytes FDBytes add mul CIDMapOffset add def
  404. /cidMapNextOffset cidMapOffset GDBytes add FDBytes add def
  405. GlyphData cidMapOffset FDBytes GDBytes add pdf_GetInterval
  406. dup
  407. FDBytes 0 ne
  408. { 0 FDBytes pdf_cvnsi }
  409. { 0 }
  410. ifelse
  411. /fdIndex exch def
  412. FDBytes GDBytes pdf_cvnsi
  413. /charStringOffset exch def
  414. GlyphData cidMapNextOffset FDBytes GDBytes add pdf_GetInterval
  415. FDBytes GDBytes pdf_cvnsi
  416. charStringOffset sub
  417. /charStringLength exch def
  418. charStringLength 0 ne
  419. {
  420. GlyphData charStringOffset charStringLength pdf_GetInterval
  421. /charstring exch def
  422. exit
  423. }
  424. {
  425. cid 0 eq
  426. {
  427. /charstring nullstring def
  428. exit
  429. }
  430. if
  431. /cid 0 def
  432. }
  433. ifelse
  434. }
  435. loop
  436. pdf_dfDict pdf_dfCharCode charstring
  437. FDArray fdIndex get
  438. /Private get
  439. Level2? not
  440. {
  441. pdf_dfDict /Private
  442. 3 -1 roll
  443. { put } 1183615869 internaldict /superexec get exec
  444. }
  445. if
  446. 1183615869 internaldict
  447. Level2?
  448. { 1 index }
  449. { 3 index /Private get }
  450. ifelse
  451. dup /RunInt known
  452. { /RunInt get }
  453. { pop /CCRun }
  454. ifelse
  455. get exec
  456. }
  457. stopped
  458. { stop }
  459. if
  460. end
  461. end
  462. end
  463. end
  464. %% Restore VM state
  465. } def
  466. /BaseFontNameStr (BF00) def
  467. /BaseFontTemplate 8 dict begin
  468. /FontType 4 def
  469. /FontMatrix [0.001 0 0 0.001 0 0] def
  470. /FontBBox [-250 -250 1250 1250] def
  471. /Encoding cHexEncoding def
  472. /PaintType 0 def
  473. /BuildChar /pdf_BuildCharVM load def
  474. /Private 1 dict dup /lenIV -1 put def
  475. /CharStrings 1 dict dup /.notdef <8B FA 8E 0D 0F> put def
  476. currentdict
  477. end def
  478. /BaseFontDictSize BaseFontTemplate length 5 add def
  479. /pdf_makeocf
  480. {
  481. 11 dict begin
  482. exch /FontName exch def
  483. /FontType 0 def
  484. /FontMatrix matrix def
  485. /FMapType 2 def
  486. /bfCount 1 index /CIDCount get 1 sub 256 idiv 1 add def
  487. /Encoding 256 array def
  488. 0 1 255 { Encoding exch dup dup bfCount ge { pop bfCount } if put } for
  489. /FDepVector bfCount 1 add array def
  490. BaseFontTemplate BaseFontDictSize dict copy
  491. begin
  492. /CIDFont exch def
  493. CIDFont /FontBBox known
  494. {
  495. CIDFont /FontBBox get
  496. /FontBBox exch def
  497. }
  498. if
  499. /CDevProc CIDFont /CDevProc get def
  500. currentdict
  501. end
  502. BaseFontNameStr 3 48 put
  503. 0 1 bfCount
  504. {
  505. FDepVector exch
  506. 2 index BaseFontDictSize dict copy
  507. begin
  508. dup /CIDFirstByte exch 256