home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 4 / FreshFish_May-June1994.bin / useful / dist / text / tex / pastex / macros / latex / nfss2 / psmetrics / texchars.pro < prev    next >
Text File  |  1993-07-29  |  3KB  |  79 lines

  1. %%BeginDocument: texchars.pro
  2. %%
  3. %% create a small new font with some extra characters
  4. %% S Rahtz December 1990; stolen from Amanda Walker's font for TeX
  5. %%
  6. /TeXZZencoding 256 array def
  7. 0 1 255  { TeXZZencoding exch /.notdef put } for
  8. TeXZZencoding dup 0 /ff put dup 1
  9.  /ffi put dup 2 /ffl put dup 3 /dotlessj put pop
  10. /MakeTeXChars {
  11. 20 dict begin
  12.         /FontType 3 def
  13.         /FontMatrix [.001 0 0 .001 0 0] def
  14.         /FontBBox [0 0 1000 1000] def
  15.     /FontName exch def
  16.     /BFont exch def
  17.         /BaseFonts [ BFont findfont 1000 scalefont ] def
  18.         /Encoding TeXZZencoding def
  19.         /String 1 string def
  20.         /CharProcs 5 dict def
  21.         CharProcs begin
  22.                 /.notdef { } def
  23.                 /ff {
  24.                         (ff) stringwidth exch 50 sub exch
  25.                         0 0 moveto (ff) false charpath flattenpath pathbbox
  26.                         exch 50 sub exch
  27.                         6 copy setcachedevice
  28.                         0 0 moveto (f) show -50 0 rmoveto (f) show
  29.                 } def
  30.                 /ffi {
  31.                         (f\256) stringwidth exch 50 sub exch
  32.                         0 0 moveto (f\256) false charpath flattenpath pathbbox
  33.                         exch 50 sub exch
  34.                         6 copy setcachedevice
  35.                         0 0 moveto (f) show -50 0 rmoveto (\256) show
  36.                 } def
  37.                 /ffl {
  38.                         (f\257) stringwidth exch 50 sub exch
  39.                         0 0 moveto (f\257) false charpath flattenpath pathbbox
  40.                         exch 50 sub exch
  41.                         6 copy setcachedevice
  42.                         0 0 moveto (f) show -50 0 rmoveto (\257) show
  43.                 } def
  44.                 /dotlessj {
  45.                         (j) stringwidth
  46.                         0 0 moveto (j) false charpath flattenpath pathbbox
  47.                         6 copy setcachedevice newpath
  48.                         0 0 moveto (\365) false charpath flattenpath pathbbox
  49.                         newpath -1000 -1000 moveto
  50.                         dup -1000 exch lineto
  51.                         1000 exch lineto
  52.                         1000 -1000 lineto
  53.                         closepath clip
  54.                         pop pop pop
  55.                         0 0 moveto (j) show
  56.                 } def
  57.         end
  58.         /BuildChar {
  59.                 exch begin
  60.                 BaseFonts 0 get  setfont
  61.                 dup Encoding exch get
  62.                 dup CharProcs exch known
  63.                         { CharProcs exch get exch pop exec }
  64.                         { pop String exch 0 exch put
  65.                           String stringwidth
  66.                           newpath 0 0 moveto String false charpath
  67.                           flattenpath pathbbox
  68.                           setcachedevice
  69.                           0 0 moveto
  70.                           String show
  71.                         } ifelse
  72.                 end
  73.         } def
  74.         currentdict
  75. end
  76. dup /FontName get exch definefont pop
  77. } def
  78. %%EndDocument
  79.