2 % Formatted font dump. Assumes all fonts include valid FontBBox arrays.
18 /hireslinewidth 0.2 def
24 /labelfont /Helvetica def
30 /pagebbox [0 0 612 792] def
33 /min {2 copy gt {exch} if pop} def
34 /max {2 copy lt {exch} if pop} def
40 /BBoxHeight {dup URy exch LLy sub} bind def
41 /BBoxWidth {dup URx exch LLx sub} bind def
44 /graylevels [1 0 0] def
45 /scratchstring 512 string def
46 /Product statusdict begin /product where {pop product}{(Unknown)} ifelse end def
47 /Resolution 0 72 dtransform dup mul exch dup mul add sqrt cvi def
48 /Version /version where {pop version}{(???)} ifelse def
50 landscape {/orientation 90 orientation add def} if
53 xcenter ycenter translate
54 orientation rotation mul rotate
55 width 2 div neg height 2 div translate
56 xoffset inch yoffset inch neg translate
57 margin dup neg translate
58 0 labelspace .75 mul neg translate
59 magnification dup aspectratio mul scale
60 0 0 transform round exch round exch itransform translate
62 currentdict /linewidth known not {
63 /linewidth Resolution 400 le {0}{hireslinewidth} ifelse def
69 /pagebbox [clippath pathbbox newpath] def
70 roundpage currentdict /roundpagebbox known and {roundpagebbox} if
73 4 -1 roll exch 4 1 roll 4 copy
74 landscape {4 2 roll} if
77 add 2 div /xcenter exch def
78 add 2 div /ycenter exch def
83 /chname Encoding chcode get def
84 /chstring ( ) dup 0 chcode put def
87 graylevels 0 1 put % initial cell fill
88 graylevels 1 0 put % cell text
89 graylevels 2 0 put % cell border
91 FontDict /CharStrings known {
92 FontDict /CharStrings get chname known not {
101 graylevels 0 graynotdef put
102 graylevels 1 graynotdef put
106 {FontDict 1 scalefont setfont chstring stringwidth pop}
112 /gridwidth width margin 2 mul sub def
113 /gridheight height labelspace sub margin 2 mul sub def
114 /cellwidth gridwidth radix div def
115 /cellheight gridheight Entries radix div ceiling div def
117 cellwidth cellheight dtransform truncate exch truncate exch idtransform
121 labelfont findfont 1 scalefont setfont
122 /LabelBBox currentfont /FontBBox get TransformBBox def
124 LabelBBox 2 0 Encoding {
125 scratchstring cvs stringwidth pop
131 cellheight .20 mul cellwidth .90 mul LabelBBox BestFit
135 zerocell CellOrigin cellheight add neg exch neg exch translate
139 FontName findfont 1 scalefont setfont
140 /BBox currentfont /FontBBox get TransformBBox def
141 /PointSize cellheight .5 mul cellwidth .8 mul BBox BestFit def
142 BBox {PointSize mul} forall BBox astore pop
144 /xorigin cellwidth BBox BBoxWidth sub 2 div BBox LLx sub def
145 /yorigin cellheight BBox BBoxHeight sub 2 div BBox LLy sub def
150 bbox BBoxWidth div exch
151 bbox BBoxHeight div min
154 /TransformBBox { % font bbox to user space
156 currentfont /FontMatrix get dtransform 4 2 roll
157 currentfont /FontMatrix get dtransform 4 2 roll
158 4 array astore % should build user space bbox if all zeros
163 exch radix mod cellwidth mul
164 exch radix idiv 1 add neg cellheight mul
172 cellwidth neg 0 rlineto
178 chcode CellOrigin translate
179 linewidth .5 mul setlinewidth
180 labelfont findfont CellLabelSize scalefont setfont
183 cellwidth .025 mul cellheight .05 mul moveto
184 chcode radix scratchstring cvrs show
187 charwidth chknown and {
188 /wid chwid 0.0005 add scratchstring cvs 0 5 getinterval def
189 cellwidth wid stringwidth pop 1.10 mul sub cellheight .05 mul moveto
193 longnames chknown not or {
195 cellheight LabelBBox URy CellLabelSize mul sub .05 sub moveto
196 Encoding chcode get scratchstring cvs show
199 axescount 1 ge chknown and { % gsave/grestore if not last
201 xorigin yorigin translate
203 BBox LLx 0 moveto % baseline
204 BBox URx 0 lineto stroke
206 axescount 2 ge { % vertical through current origin
208 0 BBox URy lineto stroke
211 axescount 3 ge { % vertical through next origin
212 chwid PointSize mul BBox LLy
213 dtransform round exch round exch idtransform moveto
214 0 BBox BBoxHeight rlineto stroke
215 %chwid PointSize mul BBox URy lineto stroke
222 FontName findfont PointSize scalefont setfont
223 chcode CellOrigin moveto
224 xorigin yorigin rmoveto
225 ( ) dup 0 chcode put show
229 labelfont findfont labelspace .75 mul .75 mul 18 min scalefont setfont
230 0 labelspace .75 mul .25 mul moveto
231 FontName scratchstring cvs show
233 labelfont findfont labelspace .25 mul .75 mul 9 min scalefont setfont
234 0 gridheight neg moveto
235 0 labelspace .25 mul .75 mul neg rmoveto
236 Product show ( Version ) show Version show
237 ( \() show Resolution scratchstring cvs show (dpi\)) show
239 gridwidth gridheight neg moveto
240 0 labelspace .25 mul .75 mul neg rmoveto
241 (size=, ) stringwidth pop neg 0 rmoveto
242 PointSize cvi scratchstring cvs stringwidth pop neg 0 rmoveto
243 (gray=, ) stringwidth pop neg 0 rmoveto
244 graynotdef scratchstring cvs stringwidth pop neg 0 rmoveto
245 (linewidth=) stringwidth pop neg 0 rmoveto
246 linewidth scratchstring cvs stringwidth pop neg 0 rmoveto
247 (size=) show PointSize cvi scratchstring cvs show (, ) show
248 (gray=) show graynotdef scratchstring cvs show (, ) show
249 (linewidth=) show linewidth scratchstring cvs show
253 % Formatted dump of the encoded characters in a single font.
259 /FontDict FontName findfont def
260 /Encoding FontDict /Encoding get def
261 /Entries Encoding length def
266 zerocell 1 Entries 1 sub {
268 graylevels 0 get setgray
269 chcode CellOutline fill
270 graylevels 1 get setgray
273 graylevels 2 get setgray
274 linewidth setlinewidth
275 chcode CellOutline stroke
282 % Dump of all ROM and disk fonts - in alphabetical order.
286 /AllFontNames FontDirectory maxlength array def
289 FontDirectory {pop AllFontNames Insert} forall
291 /filenameforall where {
294 {(fonts/) search pop pop pop AllFontNames Insert}
299 1 1 AllFontNames 0 get {
300 AllFontNames exch get cvn PrintFont
304 /Insert { % name in a sorted list
306 /Name exch 128 string cvs def
310 Name List Slot get le {exit} if
316 List 3 1 roll exch 1 add exch put
319 List 0 List 0 get 1 add put