home *** CD-ROM | disk | FTP | other *** search
/ The Selectware System / IBM57.ISO / hav10000 / easyflow.psh < prev    next >
Text File  |  1990-06-10  |  9KB  |  282 lines

  1. /bd {bind def} def
  2. /thinline {0.5} bd         %thickness of all not bold lines
  3. /shadeline {2.25} bd        %thickness of lines which shade boxes
  4. /thickline {5} bd          %thickness of bold lines
  5. /NormHgt {-10} bd          %height of text characters
  6. /SubSupHgt {-5} bd         %height of sub and superscript chars (1/2 of NormHgt)
  7. /DblHgt {-20} bd           %height of regular titles (2 * NormHgt)
  8. /QuadHgt {-40} bd          %height of large titles (4 * NormHgt)
  9. /NormalFN {/Courier} bd   %font used for not bold text
  10. /BoldFN {/Courier-Bold} bd %font used for bold text
  11. newpath 0 0 moveto 6 0 lineto 6 10 lineto 0 10 lineto closepath clip
  12. /MenuVec [
  13.    65 /Alpha
  14.    66 /Beta
  15.    67 /Psi
  16.    68 /Delta
  17.    69 /Epsilon
  18.    70 /Phi
  19.    71 /Gamma
  20.    72 /Eta
  21.    73 /Iota
  22.    74 /Xi
  23.    75 /Kappa
  24.    76 /Lambda
  25.    77 /Mu
  26.    78 /Nu
  27.    79 /Omicron
  28.    80 /Pi
  29.    81 /space
  30.    82 /Rho
  31.    83 /Sigma
  32.    84 /Tau
  33.    85 /Theta
  34.    86 /Omega
  35.    87 /space
  36.    88 /Chi
  37.    89 /Upsilon
  38.    90 /Zeta
  39.    97 /alpha
  40.    98 /beta
  41.    99 /psi
  42.    100 /delta
  43.    101 /epsilon
  44.    102 /phi
  45.    103 /gamma
  46.    104 /eta
  47.    105 /iota
  48.    106 /xi
  49.    107 /kappa
  50.    108 /lambda
  51.    109 /mu
  52.    110 /nu
  53.    111 /omicron
  54.    112 /pi
  55.    113 /space
  56.    114 /rho
  57.    115 /sigma
  58.    116 /tau
  59.    117 /theta
  60.    118 /omega
  61.    119 /space
  62.    120 /chi
  63.    121 /upsilon
  64.    122 /zeta
  65. ] def
  66. /ReEncodeDict 60 dict def
  67. ReEncodeDict
  68. begin
  69.       /BasefontDict /Symbol findfont def
  70.       /NewfontDict BasefontDict maxlength dict def
  71.       BasefontDict
  72.          {exch dup /FID ne
  73.           {dup /Encoding eq
  74.            {exch dup length array copy
  75.             NewfontDict 3 1 roll put}
  76.            {exch NewfontDict 3 1 roll put}
  77.            ifelse
  78.           }
  79.           {pop pop}
  80.           ifelse
  81.      } forall
  82.       NewfontDict /FontName /Greek put
  83.       MenuVec aload
  84.       length 2 idiv
  85.          {NewfontDict /Encoding get 3 1 roll put}
  86.      repeat
  87.       /Greek NewfontDict definefont pop
  88. end
  89. /NCVec [
  90.     161 /space
  91.     162 /Ccedilla
  92.     163 /udieresis
  93.     164 /eacute
  94.     165 /acircumflex
  95.     166 /adieresis
  96.     167 /agrave
  97.     168 /aring
  98.     169 /ccedilla
  99.     170 /ecircumflex
  100.     171 /edieresis
  101.     172 /egrave
  102.     173 /idieresis
  103.     174 /icircumflex
  104.     175 /igrave
  105.     176 /Adieresis
  106.     177 /Aring
  107.     178 /Eacute
  108.     179 /ae
  109.     180 /AE
  110.     181 /ocircumflex
  111.     182 /odieresis
  112.     183 /ograve
  113.     184 /ucircumflex
  114.     185 /ugrave
  115.     186 /ydieresis
  116.     187 /Odieresis
  117.     188 /Udieresis
  118.     189 /oslash
  119.     190 /sterling
  120.     191 /Oslash
  121.     192 /space
  122.     193 /florin
  123.     194 /aacute
  124.     195 /iacute
  125.     196 /oacute
  126.     197 /uacute
  127.     198 /ntilde
  128.     199 /Ntilde
  129.     200 /ordfeminine
  130.     201 /ordmasculine
  131.     202 /questiondown
  132.     203 /space
  133.     204 /logicalnot
  134.     205 /space
  135.     206 /space
  136.     207 /exclamdown
  137.     208 /guillemotleft
  138.     209 /guillemotright
  139.     210 /grave
  140.     211 /acute
  141.     212 /circumflex
  142.     213 /dieresis
  143.     214 /ring
  144.     215 /cedilla
  145.     216 /tilde
  146.     217 /macron
  147.     218 /breve
  148.     219 /dotaccent
  149. ] def
  150. /ReEncodeDict 255 dict def
  151. ReEncodeDict
  152. begin
  153.       /BasefontDict NormalFN findfont def
  154.       /NewfontDict BasefontDict maxlength dict def
  155.       BasefontDict
  156.          {exch dup /FID ne
  157.           {dup /Encoding eq
  158.            {exch dup length array copy
  159.             NewfontDict 3 1 roll put}
  160.            {exch NewfontDict 3 1 roll put}
  161.            ifelse
  162.           }
  163.           {pop pop}
  164.           ifelse
  165.      } forall
  166.       NewfontDict /FontName /NC put
  167.       NCVec aload
  168.       length 2 idiv
  169.          {NewfontDict /Encoding get 3 1 roll put}
  170.      repeat
  171.       /NC NewfontDict definefont pop
  172. end
  173. /ReEncodeDict 255 dict def
  174. ReEncodeDict
  175. begin
  176.       /BasefontDict BoldFN findfont def
  177.       /NewfontDict BasefontDict maxlength dict def
  178.       BasefontDict
  179.          {exch dup /FID ne
  180.           {dup /Encoding eq
  181.            {exch dup length array copy
  182.             NewfontDict 3 1 roll put}
  183.            {exch NewfontDict 3 1 roll put}
  184.            ifelse
  185.           }
  186.           {pop pop}
  187.           ifelse
  188.      } forall
  189.       NewfontDict /FontName /NCB put
  190.       NCVec aload
  191.       length 2 idiv
  192.          {NewfontDict /Encoding get 3 1 roll put}
  193.      repeat
  194.       /NCB NewfontDict definefont pop
  195. end
  196. /dcr 0 def /dcg 0 def /dcb 0 def
  197. /Widest {{stringwidth pop dup 3 2 roll dup 4 1 roll exch gt {pop} {exch pop} ifelse} forall} def
  198. %PrintGreek (monospaces each character)
  199. /PG {dup stringwidth pop TW exch sub 2 div dup 0 rmoveto exch IW exch 0 exch ashow 0 rmoveto} def
  200. %CreateFont (scales and selects desired font)
  201. /CF {FN findfont W H [1 0 0 1 0 0] scale makefont setfont} bd
  202. %GetWidth (finds widest character in a font)
  203. /GW {FN findfont 1 scalefont setfont
  204.      0
  205.      [(\0) (\1) (\2) (\3) (\4) (\5) (\6) (\7)] Widest
  206.      [(\10) (\11) (\12) (\13) (\14) (\15) (\16) (\17)] Widest
  207.      [(\20) (\21) (\22) (\23) (\24) (\25) (\26) (\27)] Widest
  208.      [(\30) (\31) (\32) (\33) (\34) (\35) (\36) (\37)] Widest
  209.      [(\40) (\41) (\42) (\43) (\44) (\45) (\46) (\47)] Widest
  210.      [(\50) (\51) (\52) (\53) (\54) (\55) (\56) (\57)] Widest
  211.      [(\60) (\61) (\62) (\63) (\64) (\65) (\66) (\67)] Widest
  212.      [(\70) (\71) (\72) (\73) (\74) (\75) (\76) (\77)] Widest
  213.      [(\100) (\101) (\102) (\103) (\104) (\105) (\106) (\107)] Widest
  214.      [(\110) (\111) (\112) (\113) (\114) (\115) (\116) (\117)] Widest
  215.      [(\120) (\121) (\122) (\123) (\124) (\125) (\126) (\127)] Widest
  216.      [(\130) (\131) (\132) (\133) (\134) (\135) (\136) (\137)] Widest
  217.      [(\140) (\141) (\142) (\143) (\144) (\145) (\146) (\147)] Widest
  218.      [(\150) (\151) (\152) (\153) (\154) (\155) (\156) (\157)] Widest
  219.      [(\160) (\161) (\162) (\163) (\164) (\165) (\166) (\167)] Widest
  220.      [(\170) (\171) (\172) (\173) (\174) (\175) (\176) (\177)] Widest
  221.      [(\200) (\201) (\202) (\203) (\204) (\205) (\206) (\207)] Widest
  222.      [(\210) (\211) (\212) (\213) (\214) (\215) (\216) (\217)] Widest
  223.      [(\220) (\221) (\222) (\223) (\224) (\225) (\226) (\227)] Widest
  224.      [(\230) (\231) (\232) (\233) (\234) (\235) (\236) (\237)] Widest
  225.      [(\240) (\241) (\242) (\243) (\244) (\245) (\246) (\247)] Widest
  226.      [(\250) (\251) (\252) (\253) (\254) (\255) (\256) (\257)] Widest
  227.      [(\260) (\261) (\262) (\263) (\264) (\265) (\266) (\267)] Widest
  228.      [(\270) (\271) (\272) (\273) (\274) (\275) (\276) (\277)] Widest
  229.      [(\300) (\301) (\302) (\303) (\304) (\305) (\306) (\307)] Widest
  230.      [(\310) (\311) (\312) (\313) (\314) (\315) (\316) (\317)] Widest
  231.      [(\320) (\321) (\322) (\323) (\324) (\325) (\326) (\327)] Widest
  232.      [(\330) (\331) (\332) (\333) (\334) (\335) (\336) (\337)] Widest
  233.      [(\340) (\341) (\342) (\343) (\344) (\345) (\346) (\347)] Widest
  234.      [(\350) (\351) (\352) (\353) (\354) (\355) (\356) (\357)] Widest
  235.      [(\360) (\361) (\362) (\363) (\364) (\365) (\366) (\367)] Widest
  236.      [(\370) (\371) (\372) (\373) (\374) (\375) (\376) (\377)] Widest
  237.      5 exch div
  238.      /W exch def
  239.     } bd
  240. %selects one of the different fonts
  241. /nf {/FN {/NC} def /TW 5 def /IW 1 def /H NormHgt def GW CF} bd
  242. /sf {/FN {/NC} def /TW 5 def /IW 1 def /H SubSupHgt def GW CF} bd
  243. /df {/FN {/NC} def /TW 10 def /IW 2 def /H DblHgt def GW W 2 mul /W exch def CF} bd
  244. /qf {/FN {/NC} def /TW 20 def /IW 4 def /H QuadHgt def GW W 4 mul /W exch def CF} bd
  245. /bf {/FN {/NCB} def /TW 5 def /IW 1 def /H NormHgt def GW CF} bd
  246. /SG {/Greek findfont [6 0 0 NormHgt 0 0] makefont setfont /TW 5 def /IW 1 def} def
  247. %abbreviated postscript commands
  248. /slw {setlinewidth} bd
  249. /mt {moveto} bd
  250. /rmt {rmoveto} bd
  251. /lt {lineto} bd
  252. /rlt {rlineto} bd
  253. /strk {stroke} bd
  254. /slj {setlinejoin} bd
  255. /dc {dcr dcg dcb setrgbcolor} bd dc
  256. /colour {/dcb exch 1 sub dup 2 mod exch /dcr exch 2 idiv dup 2 mod exch /dcg exch 2 idiv def def def dc} bd
  257. %selects different line styles
  258. /nl {dc thinline slw [] 0 setdash} bd
  259. /sl {dc shadeline slw} bd
  260. /bl {dc thickline slw} bd
  261. /dl {dc thinline slw [5 2] 0 setdash} bd
  262. %line decorators
  263. /au {2 slj 0 -4 rmt 3 -6 rlt 3 6 rlt strk 0 slj} bd
  264. /ad {2 slj 0 -6 rmt 3 6 rlt 3 -6 rlt strk 0 slj} bd
  265. /al {2 slj 6 -2 rmt -6 -3 rlt 6 -3 rlt strk 0 slj} bd
  266. /ar {2 slj 0 -2 rmt 6 -3 rlt -6 -3 rlt strk 0 slj} bd
  267. /cu {0 -10 rmt 3 6 rlt 3 -6 rlt strk} bd
  268. /cd {3 -6 rlt 3 6 rlt strk} bd
  269. /cl {0 -2 rmt 6 -3 rlt -6 -3 rlt strk} bd
  270. /cr {6 -2 rmt -6 -3 rlt 6 -3 rlt strk} bd
  271. /ch {3 -5 rmt currentpoint 2.5 0 rmt 2.5 0 360 arc strk} bd
  272. /cv {3 -5 rmt currentpoint 2.5 0 rmt 2.5 0 360 arc strk} bd
  273. /hb {3 -2 rmt 0 -6 rlt strk} bd
  274. /vb {0 -5 rmt 6 0 rlt strk} bd
  275. /chb {1 -3 rmt 0 -4 rlt currentpoint exch 2 add exch 2 180 0 arc 0 4 rlt currentpoint exch -2 add exch 2 0 180 arc strk} bd
  276. /cvb {5 -3 rmt -4 0 rlt currentpoint -2 add 2 90 270 arc 4 0 rlt currentpoint 2 add 2 270 90 arc strk} bd
  277. /atu {2 slj 0.5 -6 rmt 2.5 -4 rlt 2.5 4 rlt closepath fill 0 slj} bd
  278. /atd {2 slj 0.5 -4 rmt 2.5 4 rlt 2.5 -4 rlt closepath fill 0 slj} bd
  279. /atl {2 slj 4 -2.5 rmt -4 -2.5 rlt 4 -2.5 rlt closepath fill 0 slj} bd
  280. /atr {2 slj 2 -2.5 rmt 4 -2.5 rlt -4 -2.5 rlt closepath fill 0 slj} bd
  281. 
  282.