Article View: comp.lang.postscript
Article #5761PROBLEM -- Bitmap fonts
From: mcsbc4sg
Date: Fri, 20 Nov 1992 12:43
Date: Fri, 20 Nov 1992 12:43
113 lines
4632 bytes
4632 bytes
Hello,
Can anyone help me ..... I am trying to creat 8x16 bitmap fonts.
I copied the method of generating the fonts from the PostScript Tutorial and
Cookbook but the program does not want to work!!!
I even typed in the example program ...still no joy (same errors though).
Is there a subtle error in the file?
Or can anyone suggest a method that works for creating bitmap fonts??
advTHANXance.
Stephen.
----------------------------------------------------
The errors....
Error: /invalidfont in [/.notdef ......../.notdef]
Operand stack:
-dicttype- /Bitfont
Execution stack:
operator_200539ec --nostringval-- --nostringval-- false
--nostringval-
- --nostringval-- false --nostringval-- --nostringval-- --nostringval--
Dictionary stack:
337/401 3/200
here is the program ........
%!PS-Adobe-3.0
9 dict dup begin
/FontType 3 def
/FontMatrix [1 0 0 1 0 0] def
/FontBBox [0 0 0 0] def % do not make assumptions about bbox
/Encoding 256 array def
0 1 255 {Encoding exch /.notdef put} for
Encoding
dup 65 /A put dup 66 /B put dup 67 /C put dup 68 /D put
dup 69 /E put dup 70 /F put dup 71 /G put dup 72 /H put dup 73 /I put
dup 74 /J put dup 75 /K put dup 76 /L put dup 77 /M put dup 78 /N put
dup 79 /O put dup 80 /P put dup 81 /Q put dup 82 /R put dup 83 /S put
dup 84 /T put dup 85 /U put dup 86 /V put dup 87 /W put dup 88 /X put
dup 89 /Y put dup 90 /Z put
%% this builds a character when not found in the font cache
%% (thats what it said in the book!!)
/BuildChar
{0 begin
/char exch def
/fontdict exch def
/charname fontdict /Encoding get char get def
/charinfo fontdict /CharData get charname get def
/wx charinfo 0 get def
/charbbox charinfo 1 4 getinterval def
wx 0 charbbox aload pop setcachedevice
charinfo 5 get charinfo 6 get true
fontdict /imagemaskmatrix get
dup 4 charinfo 7 get put
dup 5 charinfo 8 get put
charinfo 9 1 getinterval cvx
imagemask
end
} def
/BuildChar load 0 6 dict put
/imagemaskmatrix [8 0 0 -16 0 0] def
/CharData 27 dict def
CharData begin
/A [.64 .04 0 .56 .56 8 16 0 15.5 <0000183c6666667e6666666666000000>] def
/B [.64 .04 0 .56 .56 8 16 0 15.5 <0000fc6666667c6666666666fc000000>] def
/C [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6666606060606066663c000000>] def
/D [.64 .04 0 .56 .56 8 16 0 15.5 <0000f8646666666666666664f8000000>] def
/E [.64 .04 0 .56 .56 8 16 0 15.5 <00007e626060607c606060627e000000>] def
/F [.64 .04 0 .56 .56 8 16 0 15.5 <0000fe6260607c6060606060f0000000>] def
/G [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6260606e66666666663c000000>] def
/H [.64 .04 0 .56 .56 8 16 0 15.5 <0000666666667e666666666666000000>] def
/I [.64 .04 0 .56 .56 8 16 0 15.5 <00003c1818181818181818183c000000>] def
/J [.64 .04 0 .56 .56 8 16 0 15.5 <00001e0606060606066666663c000000>] def
/K [.64 .04 0 .56 .56 8 16 0 15.5 <0000ccccccc8f0c8ccccccccce000000>] def
/L [.64 .04 0 .56 .56 8 16 0 15.5 <0000606060606060606060627e000000>] def
/M [.64 .04 0 .56 .56 8 16 0 15.5 <0000c6c6eeeed6d6d6c6c6c6c6000000>] def
/N [.64 .04 0 .56 .56 8 16 0 15.5 <000066666676766e6e66666666000000>] def
/O [.64 .04 0 .56 .56 8 16 0 15.5 <00003c6666666666666666663c000000>] def
/P [.64 .04 0 .56 .56 8 16 0 15.5 <0000fc666666667c60606060f0000000>] def
/Q [.64 .04 0 .56 .56 8 16 0 15.5 <00003c666666666666666a643a010000>] def
/R [.64 .04 0 .56 .56 8 16 0 15.5 <0000f8ccccccf8ccccccccccce000000>] def
/S [.64 .04 0 .56 .56 8 16 0 15.5 <00003a66626030180c0646665c000000>] def
/T [.64 .04 0 .56 .56 8 16 0 15.5 <00007e5a181818181818181818000000>] def
/U [.64 .04 0 .56 .56 8 16 0 15.5 <0000e66666666666666666663c000000>] def
/V [.64 .04 0 .56 .56 8 16 0 15.5 <0000e666666666666664687060000000>] def
/W [.64 .04 0 .56 .56 8 16 0 15.5 <0000c6c6c6c6d6d6d6feeec682000000>] def
/X [.64 .04 0 .56 .56 8 16 0 15.5 <00006666243c18183c24666666000000>] def
/Y [.64 .04 0 .56 .56 8 16 0 15.5 <000066666666663c181818183c000000>] def
/Z [.64 .04 0 .56 .56 8 16 0 15.5 <00007e460c0c1818303060627e000000>] def
/.notdef [.64 0 0 0 0 1 0 0 <>] def
end
/UniqueID 2 def
end
/Bitfont exch definefont pop
/Bitfont findfont 12 scalefont setfont
72 500 moveto (HELLOTHERE) show
showpage
Technical Details
Message-ID:
<1992Nov20.124306.1617@dct.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!str-ccsun!dct.ac.uk!mcsbc4sgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!doc.ic.ac.uk!uknet!str-ccsun!dct.ac.uk!mcsbc4sg From: mcsbc4sg@dct.ac.uk Newsgroups: comp.lang.postscript Subject: PROBLEM -- Bitmap fonts Message-ID: <1992Nov20.124306.1617@dct.ac.uk> Date: 20 Nov 92 12:43:06 GMT Organization: Dundee Institute of Technology Lines: 113