alphabet.ps 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. %!
  2. % Check for command line parameters:
  3. % Name, FirstSize, Ratio, NumSizes, UseOutline.
  4. /alphabetsave save def % prevent left over effects
  5. /FontName where { pop } { /FontName (Palatino-Italic) def } ifelse
  6. /FirstSize where { pop } { /FirstSize 15 def } ifelse
  7. /Ratio where { pop } { /Ratio 1.6 def } ifelse
  8. /NumSizes where { pop } { /NumSizes 3 def } ifelse
  9. /UseOutline where { pop } { /UseOutline false def } ifelse
  10. /Strings FirstSize 20 gt
  11. { [
  12. (ABCDEFGHIJ) (KLMNOPQR) (STUVWXYZ)
  13. (abcdefghijklm) (nopqrstuvwxyz)
  14. (0123456789<=>) (:;?@ !"#$%&')
  15. (\(\)*+,-./[\\]^_) (`{|}~)
  16. ] }
  17. { [
  18. (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
  19. (abcdefghijklmnopqrstuvwxyz)
  20. (0123456789<=>:;?@ !"#$%&')
  21. (\(\)*+,-./ [\\]^_ `{|}~)
  22. ] }
  23. ifelse def
  24. /sshow
  25. { gsave UseOutline
  26. { { gsave ( ) dup 0 4 -1 roll put
  27. false charpath pathbbox 0 setlinewidth stroke grestore
  28. pop 8 add currentpoint exch pop moveto pop
  29. } forall
  30. }
  31. { 2 0 3 -1 roll ashow }
  32. ifelse grestore
  33. } def
  34. FontName findfont FirstSize scalefont setfont
  35. clippath pathbbox /top exch def pop pop pop newpath
  36. 10 10 moveto
  37. NumSizes
  38. { gsave nulldevice (Q) false charpath pathbbox grestore
  39. exch pop exch sub exch pop 1.25 mul /height exch def
  40. Strings
  41. { currentpoint exch pop top height 3 mul sub gt
  42. { showpage 10 10 height sub moveto
  43. }
  44. if
  45. dup sshow
  46. UseOutline not
  47. { 0 height rmoveto gsave 0.01 rotate sshow grestore }
  48. if
  49. 0 height rmoveto
  50. } forall
  51. Ratio dup scale
  52. } repeat
  53. showpage
  54. clear cleardictstack
  55. alphabetsave restore