home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / postscri / 5631 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  4.4 KB

  1. Path: sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!str-ccsun!dct.ac.uk!mcsbc4sg
  2. From: mcsbc4sg@dct.ac.uk
  3. Newsgroups: comp.lang.postscript
  4. Subject: PROBLEM -- Bitmap fonts
  5. Message-ID: <1992Nov20.124306.1617@dct.ac.uk>
  6. Date: 20 Nov 92 12:43:06 GMT
  7. Organization: Dundee Institute of Technology
  8. Lines: 113
  9.  
  10. Hello,
  11.  
  12. Can anyone help me ..... I am trying to creat 8x16 bitmap fonts.
  13.  
  14. I copied the method of generating the fonts from the PostScript Tutorial and
  15. Cookbook but the program does not want to work!!!
  16.  
  17. I even typed in the example program ...still no joy (same errors though).
  18.  
  19. Is there a subtle error in the file? 
  20.  
  21. Or can anyone suggest a method that works for creating bitmap fonts??
  22.  
  23. advTHANXance.
  24.  
  25. Stephen.
  26.  
  27. ----------------------------------------------------
  28.  
  29. The errors....
  30.  
  31. Error: /invalidfont in [/.notdef ......../.notdef]
  32. Operand stack:
  33.     -dicttype-  /Bitfont
  34. Execution stack:
  35.     operator_200539ec    --nostringval--  --nostringval--  false
  36. --nostringval-
  37. -  --nostringval--  false  --nostringval--  --nostringval--  --nostringval--
  38. Dictionary stack:
  39.     337/401  3/200
  40.  
  41.  
  42.  
  43. here is the program ........
  44.  
  45.  
  46. %!PS-Adobe-3.0
  47. 9 dict dup begin
  48.  
  49. /FontType 3 def
  50. /FontMatrix [1 0 0 1 0 0] def
  51. /FontBBox [0 0 0 0] def % do not make assumptions about bbox
  52. /Encoding 256 array def
  53. 0 1 255 {Encoding exch /.notdef put} for
  54. Encoding
  55. dup  65 /A put dup  66 /B put dup  67 /C put dup  68 /D put 
  56. dup  69 /E put dup  70 /F put dup  71 /G put dup  72 /H put dup  73 /I put 
  57. dup  74 /J put dup  75 /K put dup  76 /L put dup  77 /M put dup  78 /N put 
  58. dup  79 /O put dup  80 /P put dup  81 /Q put dup  82 /R put dup  83 /S put 
  59. dup  84 /T put dup  85 /U put dup  86 /V put dup  87 /W put dup  88 /X put 
  60. dup  89 /Y put dup  90 /Z put 
  61.  
  62. %% this builds a character when not found in the font cache
  63. %% (thats what it said in the book!!)
  64.  
  65. /BuildChar
  66. {0 begin
  67.   /char exch def
  68.   /fontdict exch def
  69.   /charname fontdict /Encoding get char get def
  70.   /charinfo fontdict /CharData get charname get def
  71.   /wx charinfo 0 get def
  72.   /charbbox charinfo 1 4 getinterval def
  73.   wx 0 charbbox aload pop setcachedevice
  74.   charinfo 5 get charinfo 6 get true
  75.   fontdict /imagemaskmatrix get
  76.     dup 4 charinfo 7 get put
  77.     dup 5 charinfo 8 get put
  78.   charinfo 9 1 getinterval cvx
  79.   imagemask
  80.  end
  81. } def
  82.  
  83. /BuildChar load 0 6 dict put
  84. /imagemaskmatrix [8 0 0 -16 0 0] def
  85.  
  86. /CharData 27 dict def
  87. CharData begin
  88.  /A [.64 .04 0 .56 .56 8 16 0 15.5 <0000183c6666667e6666666666000000>] def
  89.  /B [.64 .04 0 .56 .56 8 16 0 15.5 <0000fc6666667c6666666666fc000000>] def
  90.  /C [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6666606060606066663c000000>] def
  91.  /D [.64 .04 0 .56 .56 8 16 0 15.5 <0000f8646666666666666664f8000000>] def
  92.  /E [.64 .04 0 .56 .56 8 16 0 15.5 <00007e626060607c606060627e000000>] def
  93.  /F [.64 .04 0 .56 .56 8 16 0 15.5 <0000fe6260607c6060606060f0000000>] def
  94.  /G [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6260606e66666666663c000000>] def
  95.  /H [.64 .04 0 .56 .56 8 16 0 15.5 <0000666666667e666666666666000000>] def
  96.  /I [.64 .04 0 .56 .56 8 16 0 15.5 <00003c1818181818181818183c000000>] def
  97.  /J [.64 .04 0 .56 .56 8 16 0 15.5 <00001e0606060606066666663c000000>] def
  98.  /K [.64 .04 0 .56 .56 8 16 0 15.5 <0000ccccccc8f0c8ccccccccce000000>] def
  99.  /L [.64 .04 0 .56 .56 8 16 0 15.5 <0000606060606060606060627e000000>] def
  100.  /M [.64 .04 0 .56 .56 8 16 0 15.5 <0000c6c6eeeed6d6d6c6c6c6c6000000>] def
  101.  /N [.64 .04 0 .56 .56 8 16 0 15.5 <000066666676766e6e66666666000000>] def
  102.  /O [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6666666666666666663c000000>] def
  103.  /P [.64 .04 0 .56 .56 8 16 0 15.5 <0000fc666666667c60606060f0000000>] def
  104.  /Q [.64 .04 0 .56 .56 8 16 0 15.5 <00003c666666666666666a643a010000>] def
  105.  /R [.64 .04 0 .56 .56 8 16 0 15.5 <0000f8ccccccf8ccccccccccce000000>] def
  106.  /S [.64 .04 0 .56 .56 8 16 0 15.5 <00003a66626030180c0646665c000000>] def
  107.  /T [.64 .04 0 .56 .56 8 16 0 15.5 <00007e5a181818181818181818000000>] def
  108.  /U [.64 .04 0 .56 .56 8 16 0 15.5 <0000e66666666666666666663c000000>] def
  109.  /V [.64 .04 0 .56 .56 8 16 0 15.5 <0000e666666666666664687060000000>] def
  110.  /W [.64 .04 0 .56 .56 8 16 0 15.5 <0000c6c6c6c6d6d6d6feeec682000000>] def
  111.  /X [.64 .04 0 .56 .56 8 16 0 15.5 <00006666243c18183c24666666000000>] def
  112.  /Y [.64 .04 0 .56 .56 8 16 0 15.5 <000066666666663c181818183c000000>] def
  113.  /Z [.64 .04 0 .56 .56 8 16 0 15.5 <00007e460c0c1818303060627e000000>] def
  114.  /.notdef [.64 0 0 0 0 1 0 0 <>] def
  115. end
  116. /UniqueID 2 def
  117. end
  118. /Bitfont exch definefont pop
  119.  
  120. /Bitfont findfont 12 scalefont setfont
  121. 72 500 moveto (HELLOTHERE) show
  122. showpage
  123.