home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 December / Chip_2000-12_cd1.bin / tema / starof / f_0016 / xprinter.prolog < prev   
Text File  |  2000-03-07  |  4KB  |  231 lines

  1. /XPrinterDict dup 200 dict def load begin
  2. /bdf{bind def}bind def
  3. /ldf{load def}bdf
  4. /m/rmoveto ldf
  5. /l2/rlineto ldf
  6. /gs/gsave ldf
  7. /gr/grestore ldf
  8. /np/newpath ldf
  9. /sv/save ldf
  10. /rs/restore ldf
  11. /tl/translate ldf
  12. /mt/matrix ldf
  13. /l/length ldf
  14. /z/dict ldf
  15. /d/def ldf
  16. /e/exch ldf
  17. /a/array ldf
  18. /ac/arc ldf
  19. /an/arcn ldf
  20. /b/begin ldf
  21. /pi/putinterval ldf
  22. /t/moveto ldf
  23. /lo/lineto ldf
  24. /st/stroke ldf
  25. /p/add ldf
  26. /s/sub ldf
  27. /c/mul ldf
  28. /v/div ldf
  29. /cp/closepath ldf
  30. /sl/scale ldf
  31. /ff/findfont ldf
  32. /mf/makefont ldf
  33. /sf/setfont ldf
  34. /f/fill ldf
  35. /sw/setlinewidth ldf
  36. /sc/setlinecap ldf
  37. /sj/setlinejoin ldf
  38. /sg/setgray ldf
  39. /ski/ISOLatin1Encoding where{pop true}{false}ifelse d
  40. /fcd{ff dup l z b{1 index /FID ne{d}{pop pop}ifelse}forall /Encoding ISOLatin1Encoding d currentdict end}bdf
  41. /fdf{e definefont pop}bdf
  42. /sdt 22 z d
  43. sdt b
  44. /tpm mt d
  45. /tpt mt d
  46. /tps mt d
  47. /cps
  48. {/pr2 e cvlit d
  49. /pr1 e cvlit d
  50. /npc pr1 l pr2 l p a d
  51. npc 0 pr1 pi
  52. npc pr1 l pr2 pi
  53. npc cvx
  54. }bdf
  55. /rmx mt d
  56. /frs
  57. {72 0 rmx defaultmatrix dtransform
  58. /yres e d /xres e d
  59. xres dup c yres dup c p sqrt
  60. }bdf
  61. end
  62.  
  63. /reencodesmalldict 12 dict def
  64. /ReEncodeSmall { 
  65.     reencodesmalldict begin
  66.         /newcodesandnames exch def
  67.         /newfontname exch def
  68.         /basefontname exch def
  69.         /basefontdict basefontname findfont def
  70.         /newfont basefontdict maxlength dict def
  71.  
  72.         basefontdict
  73.         {
  74.             exch dup /FID ne
  75.             { 
  76.                 dup /Encoding eq
  77.                 { 
  78.                     ski
  79.                     {
  80.                         exch pop
  81.                         ISOLatin1Encoding dup length array copy
  82.                     }{
  83.                          exch dup length array copy
  84.                     }
  85.                     ifelse
  86.                     newfont 3 1 roll put
  87.                 }{
  88.                     exch newfont 3 1 roll put
  89.                 }
  90.                 ifelse
  91.             }{
  92.                 pop pop
  93.             }
  94.             ifelse
  95.         } forall
  96.  
  97.         newfont /FontName newfontname put
  98.         newcodesandnames aload pop
  99.         newcodesandnames length 2 idiv
  100.         {
  101.             newfont /Encoding get 3 1 roll put
  102.         } repeat
  103.  
  104.         newfontname newfont definefont pop
  105.     end
  106. } def
  107.  
  108. /changesvec [
  109.     16#80 /euro
  110.     16#82 /quotesinglbase
  111.     16#83 /florin
  112.     16#84 /quotedblbase
  113.     16#85 /ellipsis
  114.     16#86 /dagger
  115.     16#87 /daggerdbl
  116.     16#88 /circumflex
  117.     16#89 /perthousand
  118.     16#8a /Scaron
  119.     16#8b /guilsinglleft
  120.     16#8c /OE
  121.     16#8e /zcaron
  122.     16#91 /quoteleft
  123.     16#92 /quoteright
  124.     16#93 /quotedblleft
  125.     16#94 /quotedblright
  126.     16#95 /bullet
  127.     16#96 /endash
  128.     16#97 /emdash
  129.     16#98 /tilde
  130.     16#99 /trademark
  131.     16#9a /scaron
  132.     16#9b /guilsinglright
  133.     16#9c /oe
  134.     16#9e /zcaron
  135.     16#9f /Ydieresis
  136. ] def
  137.  
  138.  
  139. /sus 
  140. {sdt b
  141. /spf e d
  142. /sag e d 
  143. /ces e d
  144. 300 ces v sag /spf load
  145. setscreen
  146. end
  147. }bdf
  148. /spt 18 z d
  149. spt b
  150. /bts
  151. {/ybit e d /xbit e d
  152. /byv bstr ybit bwd c xbit 8 idiv
  153. p get d
  154. /mask 1 7 xbit 8 mod s bitshift d
  155. byv mask and 0 ne
  156. }bdf
  157. end
  158. /bsf
  159. {spt b
  160. /y e d /x e d
  161. /xix x 1 p 2 v bpx c cvi d
  162. /yix y 1 p 2 v bpy c cvi d
  163. xix yix bts
  164. {/onb onb 1 p d 1}
  165. {/ofb ofb 1 p d 0}
  166. ifelse
  167. end
  168. }bdf
  169. /setpattern
  170. {spt b
  171. /csz e d
  172. /agl e d
  173. /bwd e d
  174. /bpy e d
  175. /bpx e d
  176. /bstr e d
  177. /onb 0 d /ofb 0 d
  178. csz agl /bsf load
  179. sus
  180. { }settransfer
  181. ofb ofb onb p v setgray
  182. end
  183. }bdf
  184. /picstr 500 string d
  185. /inch{72 c}bdf
  186. /DP{gs np 0 360 ac cp f gr}bdf
  187. /DL{gs np t lo st gr}bdf
  188. /RGB{setrgbcolor}bdf
  189. /C{gs t show gr}bdf
  190.  
  191. /ren 12 z d
  192. /REn
  193. {ren b
  194. /nwc e d
  195. /nwf e d
  196. /bft e d
  197. /bfd bft ff d
  198. /nf bfd maxlength z d
  199. bfd
  200. {e dup /FID ne 
  201. {dup /Encoding eq
  202. {e dup l a copy
  203. nf 3 1 roll put}
  204. {e nf 3 1 roll put}
  205. ifelse
  206. }
  207. {pop pop}
  208. ifelse
  209. }forall
  210. nf /FontName nwf put
  211. nwc aload pop
  212. nwc l 2 idiv
  213. {nf /Encoding get 3 1 roll put}
  214. repeat
  215. nwf nf definefont pop
  216. end
  217. }d
  218. /rots{gs t rotate show gr}bdf
  219. /imdata 256 string def
  220. /imstr1 1 string def
  221. /imdecode{
  222. currentfile imstr1 readhexstring pop 0 get 8 bitshift currentfile imstr1 readhexstring pop 0 get or {
  223. currentfile imdata 
  224. currentfile imstr1 readhexstring pop 0 get 8 bitshift currentfile imstr1 readhexstring pop 0 get or 
  225. currentfile imstr1 readhexstring pop 0 get 
  226. getinterval 
  227. readhexstring pop pop
  228. } repeat
  229. imdata
  230. } bdf
  231.