home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09963.iso / ocr / rops3244.zip / ROPSBOOT._PS < prev    next >
Text File  |  1996-04-02  |  22KB  |  625 lines

  1. %!
  2. % RoPS Interpreter - ropsboot._ps
  3. % Copyright Roger Willcocks, 1993-1996
  4. % All Rights Reserved
  5. %
  6. % The RoPS interpreter is an implementation of the level 1 PostScript
  7. % programming language interpreter described in Adobe Systems' book,
  8. % the 'PostScript language reference manual'.  RoPS is not an Adobe
  9. % approved product.  The name 'PostScript' is a registered trademark of
  10. % Adobe Systems Incorporated.
  11. %
  12. % This file, which must be called 'ropsboot._ps', is read automatically
  13. % as RoPS starts up.  After the entire file has been consumed the 'start'
  14. % procedure (which is defined towards the end of this file) is executed.
  15. % Everything that's not an operator is described in this file and can be
  16. % customized.
  17. %
  18. % Version 4.4
  19.  
  20. /true where { pop (ropsboot is already loaded) print flush
  21.         currentfile closefile } if
  22.  
  23. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  24. % At this point there's a prototype 'systemdict' on the dictionary %
  25. % stack which contains an entry for each operator, and that's all. %
  26. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  27. %%Page: 1 1
  28.  
  29. /systemdict currentdict def
  30.  
  31. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  32. % put some dictionaries in systemdict %
  33. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  34.  
  35. /$error 20 dict def
  36. /errordict 100 dict def
  37. /userdict 500 dict def
  38. /FontDirectory 500 dict readonly def
  39. /serverdict 20 dict def
  40. /statusdict 80 dict def
  41.  
  42. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  43. % 'end' requires that there are at least three dictionaries     %
  44. % on the dictionary stack; juggle things so we can safely 'end' %
  45. % the dictionaries we are about to put in to systemdict.        %
  46. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  47.  
  48. userdict begin
  49. systemdict begin
  50.  
  51. /true 1 1 eq def
  52. /false true not def
  53.  
  54. % change this line if your fonts are Unicode-encoded
  55. /unicode false def
  56.  
  57. /build$error {
  58.     $error begin
  59.         /newerror false def
  60.         /errorname null def
  61.         /command null def
  62.         % these will be sub-arrays of the space reserved below
  63.         /ostack [] def 
  64.         /estack [] def
  65.         /dstack [] def
  66.         $error /oreserve 500 array put
  67.         $error /ereserve 260 array put
  68.         $error /dreserve 25  array put
  69.     end % $error dictionary
  70. } def
  71.  
  72. /.error {   % in systemdict
  73. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  74. % following two lines report error as it occurs; not standard behaviour %
  75. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  76.  
  77. %%%    (error: ) print dup print (; ) print
  78. %%%    (command: ) print exch dup =print exch (\n) print pstack flush
  79.  
  80.     % following catches errors in this file (before the server has started)
  81.  
  82.     $error /newerror known not {
  83.         (error: ) print dup print (; ) print
  84.         (command: ) print exch dup =print exch (\n) print flush
  85.         stop
  86.     } if
  87.  
  88.     $error /newerror true put
  89.     $error exch /errorname exch put
  90.     $error exch /command exch put
  91.     count
  92.     $error /oreserve get exch
  93.     0 exch getinterval
  94.     astore
  95.     $error exch /ostack exch put
  96.     $error /dstack
  97.     $error /dreserve get dictstack 
  98.     put
  99.     $error /estack
  100.     $error /ereserve get execstack  
  101.     dup length 2 sub 0 exch getinterval
  102.     put
  103.     $error /ostack get
  104.     aload pop
  105.     stop
  106. } def
  107.  
  108. errordict begin
  109.  
  110. /handleerror {
  111.     $error /newerror get  % remember, dictionary stack may be full
  112.     {
  113.         $error /newerror false put
  114. %%%%%    (%%[ Error: ) print
  115. %%%%%    $error /errorname get =print
  116. %%%%%    (; OffendingCommand: ) print
  117. %%%%%    $error /command get =print
  118. %%%%%    ( ]%%\n) print % flush
  119.  
  120.         $error /errorname get /interrupt ne {
  121.             $error /command get =print (: ) print
  122.             $error /errorname get =print
  123.             (\n\nA fault has been detected in this\n) print
  124.             (document and it has been closed) print
  125.         } if
  126.     } if
  127. } def
  128.  
  129. /dictfull           { (dictfull)           .error } def
  130. /dictstackoverflow  { (dictstackoverflow)  .error } def
  131. /dictstackunderflow { (dictstackunderflow) .error } def
  132. /execstackoverflow  { (execstackoverflow)  .error } def
  133. /invalidaccess      { (invalidaccess)      .error } def
  134. /invalidexit        { (invalidexit)        .error } def
  135. /invalidfileaccess  { (invalidfileaccess)  .error } def
  136. /invalidfont        { (invalidfont)        .error } def
  137. /invalidrestore     { (invalidrestore)     .error } def
  138. /ioerror            { (ioerror)            .error } def
  139. /limitcheck         { (limitcheck)         .error } def
  140. /nocurrentpoint     { (nocurrentpoint)     .error } def
  141. /rangecheck         { (rangecheck)         .error } def
  142. /stackoverflow      { (stackoverflow)      .error } def
  143. /stackunderflow     { (stackunderflow)     .error } def
  144. /syntaxerror        { (syntaxerror)        .error } def
  145. /timeout            { (timeout)            .error } def
  146. /typecheck          { (typecheck)          .error } def
  147. /undefined          { (undefined)          .error } def
  148. /undefinedfilename  { (undefinedfilename)  .error } def
  149. /undefinedresult    { (undefinedresult)    .error } def
  150. /unmatchedmark      { (unmatchedmark)      .error } def
  151. /unregistered       { (unregistered)       .error } def
  152. /VMerror {
  153.     $error /newerror true put
  154.     $error /errorname (VMerror) put
  155.     $error exch /command exch put
  156.     stop
  157. } def
  158. /interrupt          { (interrupt)          .error } def  % ctrl-C
  159.  
  160. end % errordict
  161.  
  162. serverdict begin
  163.  
  164. /exitservercalled false def
  165.  
  166. /statusmsg { (%%[ ) print print ( ]%%\n) print flush } def
  167.  
  168. /exitserver 
  169.     pop
  170.     $error /newerror false put
  171.     serverdict /exitservercalled true put
  172.     stop
  173. } def
  174.  
  175.  
  176. /execjob
  177. {
  178.     { (%stdin) (r) file cvx exec } stopped
  179.     { 
  180.         $error /newerror get {
  181.         { handleerror } stopped pop % catch errors in handler
  182. %%            (Flushing: rest of job (to end-of-file) will be ignored)
  183. %%            serverdict /statusmsg get exec
  184.             (%stdin) (r) file flushfile
  185.         } if % newerror
  186.     } if % stopped
  187.     flush clear
  188.     countdictstack 2 sub { end } repeat
  189. } def
  190.  
  191.  
  192. end % serverdict
  193. % still putting things into systemdict
  194.  
  195. /handleerror { systemdict /errordict get /handleerror get exec } bind def
  196.  
  197. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  198. % compatibility definitions %
  199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  200.  
  201. statusdict begin
  202.     /setjobtimeout {} def
  203.     /product (RoPS) def
  204. end
  205.  
  206. % temporary, to allow FrameMaker spot colours
  207. /currentcolortransfer { currenttransfer dup dup dup } def
  208.  
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210. % default halftone screen; 28 lines per inch (on a 100 lpi printer) %
  211. % at an angle of 57 degrees.  Circular dots becoming square at 50%  %
  212. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  213. /ScreenFreq 28 def
  214. /ScreenAngle 57 def
  215. /LPI 100 def
  216. /WidthMM 210 def
  217. /DepthMM 297 def
  218.  
  219. (framebuffer) getprofile { { cvx exec def } forall } if % maybe override
  220.  
  221. %%%%%%%%%%%%%%%%%%%%%%%%%
  222. % create a frame buffer %
  223. %%%%%%%%%%%%%%%%%%%%%%%%%
  224.  
  225. /framescale LPI 72 div def
  226. /pixelwidth WidthMM 25.4 div LPI mul cvi def
  227. /pixeldepth DepthMM 25.4 div LPI mul cvi def
  228.  
  229. [ framescale 0 0 framescale 0 0 ]
  230. pixelwidth pixeldepth {} framedevice  % create frame device (proc unused)
  231.  
  232. ScreenFreq ScreenAngle
  233. { abs exch abs 2 copy add 1 gt
  234.     { 1 sub dup mul exch 1 sub dup mul add 1 sub }
  235.     { dup mul exch dup mul add 1 exch sub }
  236. ifelse } setscreen
  237.  
  238. end % systemdict
  239. systemdict readonly pop
  240.  
  241. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  242. % finished with systemdict; userdict is waiting on the stack ... %
  243. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  244.  
  245. /StandardEncoding
  246. [
  247.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  248.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  249.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  250.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  251.     /.notdef/.notdef/.notdef/.notdef/space/exclam/quotedbl
  252.     /numbersign/dollar/percent/ampersand/quoteright/parenleft
  253.     /parenright/asterisk/plus/comma/hyphen/period/slash/zero/one
  254.     /two/three/four/five/six/seven/eight/nine/colon/semicolon
  255.     /less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K
  256.     /L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash
  257.     /bracketright/asciicircum/underscore/quoteleft/a/b/c/d/e/f/g
  258.     /h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z/braceleft
  259.     /bar/braceright/asciitilde/.notdef/.notdef/.notdef/.notdef
  260.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  261.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  262.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  263.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  264.     /.notdef/space/exclamdown/cent/sterling/fraction/yen/florin
  265.     /section/currency/quotesingle/quotedblleft/guillemotleft
  266.     /guilsinglleft/guilsinglright/fi/fl/.notdef/endash/dagger
  267.     /daggerdbl/periodcentered/.notdef/paragraph/bullet/quotesinglbase
  268.     /quotedblbase/quotedblright/guillemotright/ellipsis/perthousand
  269.     /.notdef/questiondown/.notdef/grave/acute/circumflex/tilde
  270.     /macron/breve/dotaccent/dieresis/.notdef/degree/cedilla/.notdef
  271.     /hungarumlaut/ogonek/caron/emdash/.notdef/.notdef/.notdef
  272.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
  273.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/AE/.notdef
  274.     /ordfeminine/.notdef/.notdef/.notdef/.notdef/Lslash/Oslash/OE
  275.     /ordmasculine/.notdef/.notdef/.notdef/.notdef/.notdef/ae
  276.     /.notdef/.notdef/.notdef/dotlessi/.notdef/.notdef/lslash/oslash
  277.     /oe/germandbls/.notdef/.notdef/.notdef/.notdef
  278. ] def
  279.  
  280. /ISOLatin1Encoding
  281. [
  282.     /grave/acute/circumflex/tilde/macron/breve/dotaccent/dieresis
  283.     /ring/cedilla/hungarumlaut/ogonek/caron/dotlessi/fi/fl/Lslash
  284.     /lslash/Zcaron/zcaron/minus/.notdef/.notdef/.notdef/.notdef
  285.     /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/space
  286.     /exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
  287.     /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash
  288.     /zero/one/two/three/four/five/six/seven/eight/nine/colon
  289.     /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H
  290.     /I/J/K/L/M/N/O/P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft
  291.     /backslash/bracketright/asciicircum/underscore/grave/a/b/c/d
  292.     /e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y/z
  293.     /braceleft/bar/braceright/asciitilde/.notdef/.notdef/.notdef
  294.     /quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
  295.     /circumflex/perthousand/Scaron/guilsinglleft/OE/.notdef/.notdef
  296.     /.notdef/.notdef/quoteleft/quoteright/quotedblleft/quotedblright
  297.     /bullet/endash/emdash/tilde/trademark/scaron/guilsinglright/oe
  298.     /.notdef/.notdef/Ydieresis/.notdef/exclamdown/cent/sterling
  299.     /currency/yen/brokenbar/section/dieresis/copyright/ordfeminine
  300.     /guillemotleft/logicalnot/hyphen/registered/macron/degree
  301.     /plusminus/twosuperior/threesuperior/acute/mu/paragraph
  302.     /periodcentered/cedilla/onesuperior/ordmasculine/guillemotright
  303.     /onequarter/onehalf/threequarters/questiondown/Agrave/Aacute
  304.     /Acircumflex/Atilde/Adieresis/Aring/AE/Ccedilla/Egrave/Eacute
  305.     /Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth
  306.     /Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply
  307.     /Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn
  308.     /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae
  309.     /ccedilla/egrave/eacute/ecircumflex/edieresis/igrave/iacute
  310.     /icircumflex/idieresis/eth/ntilde/ograve/oacute/ocircumflex
  311.     /otilde/odieresis/divide/oslash/ugrave/uacute/ucircumflex
  312.     /udieresis/yacute/thorn/ydieresis
  313. ] def
  314.  
  315. /findfont {
  316.     dup FontDirectory exch known not {
  317.         (findfont: can't find ) print dup =print
  318.         (; using Courier) print flush
  319.         dup CourierFont ttmap
  320.     } if
  321.     FontDirectory exch get
  322. } bind def
  323.  
  324. /=string 140 string def
  325.  
  326. /=print { =string cvs print } bind def
  327.  
  328. /= { =print (\n) print } bind def
  329.  
  330. /==dict 20 dict def
  331.  
  332. ==dict begin
  333.     /=qc {  /str ( x) def         % quote a character
  334.         str exch 0 exch put
  335.         (\nx\\n\rx\\r\tx\\t\bx\\b\fx\\f\(x\\\(\)x\\\)\\x\\\\)
  336.         str search
  337.         { pop pop 0 2 getinterval }
  338.         { pop str 0 1 getinterval } ifelse print
  339.     } bind def
  340.  
  341.     /indent { 1 1 depth { pop (\t) print } for } def
  342.  
  343.     /expand {
  344.         indent dup type exec print
  345.         (\n) print
  346.     } bind def
  347.     /arraytype {
  348.         dup xcheck { ({\n) } { ([\n) } ifelse print
  349.         /depth depth 1 add def
  350.         dup rcheck { dup {expand} forall }
  351.         { indent (???\n) print } ifelse
  352.         /depth depth 1 sub def
  353.         indent xcheck { (}) } { (]) } ifelse
  354.     } bind def
  355.     /booleantype { { (true) } { (false) } ifelse } bind def
  356.     /dicttype { dup length =print ( ) print maxlength =print
  357.                 ( ) print (-dicttype-) } bind def
  358.     /filetype { pop (-filetype-) } bind def
  359.     /fonttype { pop (-fonttype-) } bind def
  360.     /integertype { =string cvs } bind def
  361.     /marktype { pop (-marktype-) } bind def
  362.     /nametype { dup xcheck not { (/) print } if =string cvs } bind def
  363.     /nulltype { pop (-nulltype-) } bind def
  364.     /operatortype { (--) print =string cvs print (--) } bind def
  365.     /realtype { =string cvs } bind def
  366.     /savetype { pop (-savetype-) } bind def
  367.     /stringtype { dup rcheck { (\() print {=qc} forall (\)) }
  368.             { pop (\(???\)) } ifelse } bind def
  369.  
  370.     /depth 0 def
  371. end
  372.  
  373. /== {
  374.     ==dict begin
  375.     expand
  376.     end
  377. } bind def
  378.  
  379. /stack { count dup 1 add copy { = } repeat pop } bind def
  380. /pstack { count dup 1 add copy { == } repeat pop } bind def
  381. (\004) cvn {} def % ignore ^D in input file
  382. (\032) cvn {} def % and ^Z
  383.  
  384. /server
  385. {
  386.     {
  387.         (%stdin) (r) file status not { exit } if
  388.  
  389.         serverdict /serversave save put
  390.         % has to be done inside save context, since writing
  391.         % to a saved array uses VM, and it could be vmerror
  392.         build$error
  393.         serverdict /execjob get exec
  394.         serverdict /exitservercalled get
  395.         serverdict /serversave get restore
  396.         {
  397.             (exitserver : permanent state may be changed)
  398.             serverdict /statusmsg get exec
  399.             serverdict /execjob get exec
  400.  
  401.         } if % exitservercalled
  402.     } loop
  403. } bind def
  404.  
  405. /quit  { stop } bind def
  406. /start { server } bind def
  407.  
  408. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  409. % userdict is still on stack; system/user specific stuff starts here %
  410. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  411.  
  412. /encode {
  413.     { 1 index def 1 add } forall pop
  414. } def
  415.  
  416. /TT_ANSI_CharStrings 650 dict dup  % map character name to font entry
  417. begin
  418.  
  419. 32 [
  420. /space/exclam/quotedbl/numbersign/dollar/percent/ampersand/quotesingle
  421. /parenleft/parenright/asterisk/plus/comma/hyphen/period/slash/zero/one
  422. /two/three/four/five/six/seven/eight/nine/colon/semicolon/less/equal
  423. /greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O/P/Q/R/S
  424. /T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/asciicircum
  425. /underscore/grave/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t
  426. /u/v/w/x/y/z/braceleft/bar/braceright/asciitilde/.notdef
  427. ] encode
  428.  
  429. 16#a0 [
  430. /nbspace/exclamdown/cent/sterling/currency/yen/brokenbar
  431. /section/dieresis/copyright/ordfeminine/guillemotleft/logicalnot
  432. /sfthyphen/registered/macron/degree/plusminus/twosuperior
  433. /threesuperior/acute/mu/paragraph/periodcentered/cedilla
  434. /onesuperior/ordmasculine/guillemotright/onequarter/onehalf
  435. /threequarters/questiondown/Agrave/Aacute/Acircumflex/Atilde
  436. /Adieresis/Aring/AE/Ccedilla/Egrave/Eacute/Ecircumflex
  437. /Edieresis/Igrave/Iacute/Icircumflex/Idieresis/Eth/Ntilde
  438. /Ograve/Oacute/Ocircumflex/Otilde/Odieresis/multiply/Oslash
  439. /Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn/germandbls
  440. /agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla
  441. /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex
  442. /idieresis/eth/ntilde/ograve/oacute/ocircumflex/otilde
  443. /odieresis/divide/oslash/ugrave/uacute/ucircumflex/udieresis
  444. /yacute/thorn/ydieresis] encode
  445.  
  446. unicode {
  447.     % Windows encoding
  448.  
  449.     130 [
  450.     /quotesinglbase/florin/quotedblbase/ellipsis/dagger/daggerdbl
  451.     /circumflex/perthousand/Scaron/guilsinglleft/OE
  452.     ] encode
  453.  
  454.     145 [
  455.     /quoteleft/quoteright/quotedblleft/quotedblright/bullet
  456.     /endash/emdash/tilde/trademark/scaron/guilsinglright/oe
  457.     ] encode
  458.  
  459.     /minus 150 def
  460.     /Ydieresis 159 def
  461.  
  462.     % skip over Unicode encoding
  463.     { currentfile =string readline pop (/xyzzy) eq { exit } if } loop
  464. } if
  465.  
  466. % NT (Unicode) encoding
  467.  
  468. 16#100 [
  469. /Amacron/amacron/Abreve/abreve/Aogonek/aogonek/Cacute/cacute/Ccircumflex
  470. /ccircumflex/Cdot/cdot/Ccaron/ccaron/Dcaron/dcaron/Dslash/dmacron
  471. /Emacron/emacron/Ebreve/ebreve/Edot/edot/Eogonek/eogonek/Ecaron/ecaron
  472. /Gcircumflex/gcircumflex/Gbreve/gbreve/Gdot/gdot/Gcedilla/gcedilla
  473. /Hcircumflex/hcircumflex/Hbar/hbar/Itilde/itilde/Imacron/imacron/Ibreve
  474. /ibreve/Iogonek/iogonek/Idot/dotlessi/IJ/ij/Jcircumflex/jcircumflex
  475. /Kcedilla/kcedilla/kgreenlandic/Lacute/lacute/Lcedilla/lcedilla/Lcaron
  476. /lcaron/Ldot/ldot/Lslash/lslash/Nacute/nacute/Ncedilla/ncedilla/Ncaron
  477. /ncaron/napostrophe/Eng/eng/Omacron/omacron/Obreve/obreve/Odblacute
  478. /odblacute/OE/oe/Racute/racute/Rcedilla/rcedilla/Rcaron/rcaron/Sacute
  479. /sacute/Scircumflex/scircumflex/Scedilla/scedilla/Scaron/scaron/Tcedilla
  480. /tcedilla/Tcaron/tcaron/Tbar/tbar/Utilde/utilde/Umacron/umacron/Ubreve
  481. /ubreve/Uring/uring/Udblacute/udblacute/Uogonek/uogonek/Wcircumflex
  482. /wcircumflex/Ycircumflex/ycircumflex/Ydieresis/Zacute/zacute/Zdot/zdot
  483. /Zcaron/zcaron/longs
  484. ] encode
  485.  
  486. 16#384 [
  487. /tonos/dieresistonos/Alphatonos/anoteleia/Epsilontonos/Etatonos
  488. /Iotatonos/c38b/Omicrontonos/c38d/Upsilontonos/Omegatonos
  489. /iotadieresistonos/Alpha/Beta/Gamma/Delta/Epsilon/Zeta/Eta/Theta/Iota
  490. /Kappa/Lambda/Mu/Nu/Xi/Omicron/Pi/Rho/c3a2/Sigma/Tau/Upsilon/Phi
  491. /Chi/Psi/Omega/Iotadieresis/Upsilondieresis/alphatonos/epsilontonos
  492. /etatonos/iotatonos/upsilon-dieresistonos/alpha/beta/gamma/delta/epsilon
  493. /zeta/eta/theta/iota/kappa/lambda/mu/nu/xi/omicron/pi/rho/sigma1
  494. /sigma/tau/upsilon/phi/chi/psi/omega/iotadieresis/upsilondieresis
  495. /omicrontonos/upsilontonos/omegatonos
  496. ] encode
  497.  
  498. % read and define key / value pairs until key = /zyzzy is seen
  499.  
  500. {
  501.     currentfile token pop dup /xyzzy eq
  502.     { pop exit }
  503.     { currentfile token pop def } ifelse
  504. } loop
  505.  
  506. /florin 16#192/Aringacute 16#1fa/aringacute 16#1fb/AEacute 16#1fc
  507. /aeacute 16#1fd/Oslashacute 16#1fe/oslashacute 16#1ff/circumflex
  508. 16#2c6/caron 16#2c7/macron 16#2c9/tilde 16#2d6/breve 16#2d8
  509. /dotaccent 16#2d9/ring 16#2da/ogonek 16#2db/tilde 16#2dc
  510. /hungarumlaut 16#2dd
  511.  
  512. /Wgrave 16#1e80/wgrave 16#1e81/Wacute 16#1e82/wacute 16#1e83
  513. /Wdieresis 16#1e84/wdieresis 16#1e85/Ygrave 16#1ef2/ygrave 16#1ef3
  514. /endash 16#2013/emdash 16#2014/underscoredbl 16#2017/quoteleft
  515. 16#2018/quoteright 16#2019/quotesinglbase 16#201a/quotereversed
  516. 16#201b/quotedblleft 16#201c/quotedblright 16#201d/quotedblbase
  517. 16#201e/dagger 16#2020/daggerdbl 16#2021/bullet 16#2022/ellipsis
  518. 16#2026/perthousand 16#2030/minute 16#2032/second 16#2033
  519. /guilsinglleft 16#2039/guilsinglright 16#203a/exclamdbl 16#203c
  520. /radicalex 16#203e/fraction 16#2044/nsuperior 16#207f/franc 16#20a3
  521. /peseta 16#20a7/trademark 16#2122/Ohm 16#2126/estimated 16#212e
  522. /oneeighth 16#215b/threeeighths 16#215c/fiveeighths 16#215d
  523. /seveneighths 16#215e/arrowleft 16#2190/arrowup 16#2191/arrowright
  524. 16#2192/arrowdown 16#2193/arrowboth 16#2194/arrowupdn 16#2195
  525. /arrowupdnbse 16#21a8/partialdiff 16#2202/increment 16#2206/product
  526. 16#220f/summation 16#2211/minus 16#2212/fraction 16#2215
  527. /periodcentered 16#2219/radical 16#221a/infinity 16#221e/orthogonal
  528. 16#221f/intersection 16#2229/integral 16#222b/approxequal 16#2248
  529. /notequal 16#2260/equivalence 16#2261/lessequal 16#2264/greaterequal
  530. 16#2265/house 16#2302/revlogicalnot 16#2310/integraltp
  531. 16#2320/integralbt 16#2321/upblock 16#2580/dnblock 16#2584/block
  532. 16#2588/lfblock 16#258c/rtblock 16#2590/ltshade 16#2591/shade
  533. 16#2592/dkshade 16#2593/filledbox 16#25a0/filledrect 16#25ac/triagup
  534. 16#25b2/triagrt 16#25ba/triagdn 16#25bc/triaglf 16#25c4/lozenge
  535. 16#25ca/circle 16#25cb/invbullet 16#25d8/invcircle 16#25d9/openbullet
  536. 16#25e6/smileface 16#263a/invsmileface 16#263b/sun 16#263c/female
  537. 16#2640/male 16#2642/spade 16#2660/club 16#2663/heart 16#2665/diamond
  538. 16#2666/musicalnote 16#266a/musicalnotedbl 16#266b/applelogo
  539. 16#f000/fi 16#f001/fl 16#f002
  540.  
  541. %% do not delete, change or comment the following line !!!
  542. /xyzzy
  543.  
  544. end def
  545.  
  546. /TT_BuildChar {
  547.     exch begin
  548.     FontName (Symbol) eq {
  549. %        unicode { 16#8000 add } if
  550.     }
  551.     {
  552.         Encoding exch get
  553.         dup CharStrings exch known not
  554.         { pop (.notdef) } if
  555.         CharStrings exch get
  556.     } ifelse
  557.     end
  558.     dup 127 ne { ttchar } { pop } ifelse
  559. } def
  560.  
  561. /TT_FontInfo 2 dict dup begin
  562.     /UnderlinePosition -0.1 def
  563.     /UnderlineThickness 0.1 def
  564.     end def
  565.  
  566. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  567. % This function associates PostScript font names with Windows TrueType %
  568. % fonts.  The RoPS interpreter uses the Windows rendering routines to  %
  569. % paint the TrueType characters.                                       %
  570. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  571.  
  572. /ttmap {
  573.     11 dict dup begin
  574.     exch /TTName exch def
  575.     exch /FontName exch def
  576.     /Metrics 0 dict def
  577.     /FontMatrix [ 1.0 0.0 0.0 1.0 0.0 0.0 ] readonly def
  578.     /FontType 3 def
  579.     /Encoding StandardEncoding def
  580.     /FontBBox { 0 0 0 0 } readonly def
  581.     /CharStrings TT_ANSI_CharStrings def
  582.     /BuildChar /TT_BuildChar load def
  583.     /FontInfo TT_FontInfo def
  584.     FontName end
  585.     exch definefont pop
  586. } def
  587.  
  588. (fontlist) getprofile { { ttmap } forall } if
  589. (fontalias) getprofile { { ttmap } forall } if
  590. /CourierFont FontDirectory /Courier get /TTName get def
  591.  
  592. %%%%%%%%%%%
  593. % hackery %
  594. %%%%%%%%%%%
  595.  
  596. /a4tray { a4 } def
  597. /lettertray { letter } def
  598.  
  599. %
  600. % % 8" x 10.92" imageable area centred on letter paper
  601. % % Under Development !  Setting a new device interacts badly with zooming
  602. %
  603. % /letter {
  604. %     [ framescale 0 0 framescale -2.88 framescale mul -18 framescale mul ]
  605. %     8 72 mul framescale mul cvi 10.92 72 mul framescale mul cvi {} framedevice
  606. % } def
  607. % % 8" x 10.92" imageable area centred on A4 paper
  608. % /a4 {
  609. %     [ framescale 0 0 framescale -9.72 framescale mul -27.72 framescale mul ]
  610. %     8 72 mul framescale mul cvi 10.92 72 mul framescale mul cvi {} framedevice
  611. % } def
  612.  
  613. /a4 {} def
  614. /letter {} def
  615.  
  616. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  617. % when we fall off the end of this file, 'start' will be executed %
  618. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  619. % --- end ---
  620.  
  621.