home *** CD-ROM | disk | FTP | other *** search
/ Dream 49 / Amiga_Dream_49.iso / axeneoffice / live / linux-2.0 / lib / xcalibur.prc < prev    next >
Text File  |  1998-02-09  |  6KB  |  203 lines

  1. %%BeginProcSet: XCaliburDict 1 1
  2. %% ---------------- XCALIBUR POSTSCRIPT PROCSET 1.0 ----------------
  3. %% Copyright (C) 1994-1998 Axene Inc. <axene@axene.com>
  4. %% Last update Mon Feb  9 18:25:06 1998 Xibios 2
  5. %% -----------------------------------------------------------------
  6.  
  7. /XCaliburDict 100 dict def
  8. XCaliburDict begin
  9.  
  10. /bd{bind def}bind def
  11. /ld{load def}bd
  12. /dd{XCaliburDict 3 1 roll put}bd
  13. /xdd{exch dd}bd
  14. /dg{XCaliburDict exch get}bd
  15.  
  16. % Variables
  17. /_fc{}def        % fill color
  18. /_sc{}def        % stroke color
  19. /$ctm matrix def    % ctm
  20. /$cs 0 def        % char space
  21. /$ws 0 def        % word space
  22. /$tf false def        % text object flag
  23. /$riz 0 def        % text rize
  24. /$siz 0 def        % -(font size)/1000
  25. /$tr 0 def        % text rendering mode
  26. /$tl 0 def        % text leading
  27. /$tm{}def        % textmatrix
  28. /$scl 1 def        % text scaling
  29. %/$mc 1 string def    % tmp tj variable
  30. /$is{}def        % image string
  31.  
  32. % Color procs
  33. /setrgbcolor where
  34. {pop}{/setrgbcolor{.11 mul exch .59 mul add exch .3 mul add setgray}bd}ifelse
  35. /setcmykcolor where
  36. {pop}{/setcmykcolor{1 sub 4 1 roll 3{3 index add neg dup 0 lt{pop 0}if
  37. 3 1 roll}repeat setrgbcolor pop}bd}ifelse
  38. /_so{load dup type /arraytype eq{aload length}{1}ifelse}bd
  39. /_g{/setgray _so 1 add array astore cvx}bd
  40. /_k{/setcmykcolor _so 4 add array astore cvx}bd
  41. /_rg{/setrgbcolor _so 3 add array astore cvx}bd
  42. /g{_g /_fc xdd}bd
  43. /G{_g /_sc xdd}bd
  44. /k{_k /_fc xdd}bd
  45. /K{_k /_sc xdd}bd
  46. /rg{_rg /_fc xdd}bd
  47. /RG{_rg /_sc xdd}bd
  48.  
  49. % Filling & clipping procs
  50. /W/clip ld
  51. /W*/eoclip ld
  52. /f{_fc fill}bd
  53. /f*{_fc eofill}bd
  54. /S{_sc stroke}bd
  55. /s{h S}bd
  56. /b{h q f Q S}bd
  57. /B{q f Q S}bd
  58. /b*{h q f* Q S}bd
  59. /B*{q f* Q S}bd
  60. /n/newpath ld
  61.  
  62. % Graphic context procs
  63. /d/setdash ld
  64. /w/setlinewidth ld
  65. /M/setmiterlimit ld
  66. /i/setflat ld
  67. /j/setlinejoin ld
  68. /J/setlinecap ld
  69. /q/gsave ld
  70. /Q/grestore ld
  71. /cm{matrix astore concat}bd
  72. /cp/currentpoint ld
  73.  
  74. % Drawing procs
  75. /setstrokeadjust where{pop false setstrokeadjust}{}ifelse
  76. /rm/rmoveto ld
  77. /l/lineto ld
  78. /m/moveto ld
  79. /c/curveto ld
  80. /v{cp 6 2 roll c}bd
  81. /y{2 copy c}bd
  82. /h/closepath ld
  83. /re{4 2 roll m 1 index 0 rlineto 0 exch rlineto neg 0 rlineto h}bd
  84.  
  85. % Image procs
  86. /colorimage where{pop}{% colorimage emulation (8bits color samples only :-( )
  87. /_glue{2{aload length dup 2 add -1 roll}repeat add array astore cvx}bd
  88. /$c2g[{}{}{dup length 3 idiv 0 1 2 index 1 sub{dup 3 mul 3 index 1 index get .3
  89. mul 4 index 2 index 1 add get .59 mul add 4 index 2 index 2 add get .11 mul
  90. add round cvi exch pop 3 index 3 1 roll put}for 0 exch getinterval}% RGB->Gray
  91. {dup length 4 idiv 0 1 2 index 1 sub{dup 4 mul 255 4 index 2 index get .3
  92. mul 5 index 3 index 1 add get .59 mul add 5 index 3 index 2 add get .11 mul
  93. add 5 index 3 index 3 add get add round cvi dup 255 gt{pop dup}if sub exch
  94. pop 3 index 3 1 roll put}for 0 exch getinterval}% CMYK->Gray
  95. ]bd
  96. /colorimage{exch pop $c2g exch 1 sub get exch _glue image}bd}ifelse 
  97. /ASCIIHexDecode{currentfile $is readhexstring pop}bd
  98. /DeviceCMYK 4 def
  99. /DeviceRGB 3 def
  100. /DeviceGray 1 def
  101. /BI{save mark}bd
  102. /EI/restore ld
  103. /ID{counttomark 2 idiv dup dict begin {def}repeat pop Width dup
  104. BitsPerComponent ColorSpace dg mul mul 7 add 8 idiv string /$is xdd
  105. Height BitsPerComponent[Width 0 0 Height 0 0] Filter dg false ColorSpace dg
  106. end colorimage{currentfile read{62 eq{exit}if}{exit}ifelse}loop}bd
  107.  
  108. % Text procs (render mode 0 only :-( )
  109. /_dtm{$ctm setmatrix $tm concat 0 $riz translate $scl 1 scale}bd
  110. /_stm{_dtm 0 0 m}bd
  111. /_su{$ws 0 32 $cs 0 6 5 roll}bd
  112. /BT{/$tf true dd $ctm currentmatrix pop /$tm matrix dd _stm}bd
  113. /ET{/$tf false dd $ctm setmatrix n}bd
  114. /Tm{$tm astore pop _stm}bd
  115. /Td{matrix translate $tm $tm concatmatrix pop _stm}bd
  116. /TL{neg /$tl xdd}bd
  117. /TD{dup /$tl xdd Td}bd
  118. /Tf{dup 1000 div neg /$siz xdd exch findfont exch scalefont setfont}bd
  119. /Tz{100 div /$scl xdd $tf{_dtm}if}bd
  120. /Tc{/$cs xdd}bd
  121. /Tw{/$ws xdd}bd
  122. /Ts{/$riz xdd cp _dtm m}bd
  123. /Tr{/$tr xdd}bd
  124. /T*{0 $tl Td}bd
  125. /Tj{_fc _su awidthshow}bd
  126. /TJ{{dup type /stringtype ne{$siz mul 0 rm}{Tj}ifelse}forall}bd
  127. /"{exch Tc exch Tw T* Tj}bd
  128. /'{T* Tj}bd
  129.  
  130. % Font encoding
  131. /FE{findfont dup length dict begin{1 index/FID ne{def}{pop pop}ifelse}forall
  132. /FontName exch def dup type /nulltype ne{/Encoding exch def}{pop}ifelse
  133. FontName currentdict end definefont pop}bd 
  134. /XcEncoding[
  135. % 00x
  136. /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  137. % 01x
  138. /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  139. % 02x
  140. /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  141. % 03x
  142. /.notdef/.notdef/emdash/endash/florin/OE/guilsinglleft/guilsinglright
  143. % 04x
  144. /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quoteright
  145. % 05x
  146. /parenleft/parenright/asterisk/plus/comma/minus/period/slash
  147. % 06x
  148. /zero/one/two/three/four/five/six/seven
  149. % 07x
  150. /eight/nine/colon/semicolon/less/equal/greater/question
  151. % 10x
  152. /at/A/B/C/D/E/F/G
  153. % 11x
  154. /H/I/J/K/L/M/N/O
  155. % 12x
  156. /P/Q/R/S/T/U/V/W
  157. % 13x
  158. /X/Y/Z/bracketleft/backslash/bracketright/asciicircum/underscore
  159. % 14x
  160. /quoteleft/a/b/c/d/e/f/g
  161. % 15x
  162. /h/i/j/k/l/m/n/o
  163. % 16x
  164. /p/q/r/s/t/u/v/w
  165. % 17x
  166. /x/y/z/braceleft/bar/braceright/asciitilde/.notdef
  167. % 20x
  168. /perthousand/trademark/fraction/bullet/dagger/daggerdbl/ellipsis/florin
  169. % 21x (notdef)
  170. /quotedblbase/quotedblleft/quotedblright/quotesinglbase/quotesingle/fi/fl/oe
  171. % 22x (notdef)
  172. /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent
  173. % 23x (notdef)
  174. /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron
  175. % 24x
  176. /space/exclamdown/cent/sterling/currency/yen/brokenbar/section
  177. % 25x
  178. /dieresis/copyright/ordfeminine/guillemotleft/logicalnot/hyphen/registered/macron
  179. % 26x
  180. /ring/plusminus/twosuperior/threesuperior/acute/mu/paragraph/periodcentered
  181. % 27x
  182. /cedilla/onesuperior/ordmasculine/guillemotright/onequarter/onehalf/threequarters/questiondown
  183. % 30x
  184. /Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla
  185. % 31x
  186. /Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
  187. % 32x
  188. /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
  189. % 33x
  190. /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
  191. % 34x
  192. /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
  193. % 35x
  194. /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis
  195. % 36x
  196. /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide
  197. % 37x
  198. /oslash/ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis
  199. ]def
  200.  
  201. %%EndProcSet
  202.  
  203.