Code fix to support `ps-zebra-stripe-follow'
[bpt/emacs.git] / etc / ps-prin1.ps
1 % === BEGIN ps-print prologue 1
2 % version: 6.0
3
4 % ISOLatin1Encoding stolen from ps_init.ps in GhostScript 2.6.1.4:
5 /ISOLatin1Encoding where{pop}{
6 % -- The ISO Latin-1 encoding vector isn't known, so define it.
7 % -- The first half is the same as the standard encoding,
8 % -- except for minus instead of hyphen at code 055.
9 /ISOLatin1Encoding
10 StandardEncoding 0 45 getinterval aload pop
11 /minus
12 StandardEncoding 46 82 getinterval aload pop
13 %*** NOTE: the following are missing in the Adobe documentation,
14 %*** but appear in the displayed table:
15 %*** macron at 0225, dieresis at 0230, cedilla at 0233, space at 0240.
16 % 0200 (128)
17 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
18 /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef
19 /dotlessi/grave/acute/circumflex/tilde/macron/breve/dotaccent
20 /dieresis/.notdef/ring/cedilla/.notdef/hungarumlaut/ogonek/caron
21 % 0240 (160)
22 /space/exclamdown/cent/sterling
23 /currency/yen/brokenbar/section
24 /dieresis/copyright/ordfeminine/guillemotleft
25 /logicalnot/hyphen/registered/macron
26 /degree/plusminus/twosuperior/threesuperior
27 /acute/mu/paragraph/periodcentered
28 /cedilla/onesuperior/ordmasculine/guillemotright
29 /onequarter/onehalf/threequarters/questiondown
30 % 0300 (192)
31 /Agrave/Aacute/Acircumflex/Atilde
32 /Adieresis/Aring/AE/Ccedilla
33 /Egrave/Eacute/Ecircumflex/Edieresis
34 /Igrave/Iacute/Icircumflex/Idieresis
35 /Eth/Ntilde/Ograve/Oacute
36 /Ocircumflex/Otilde/Odieresis/multiply
37 /Oslash/Ugrave/Uacute/Ucircumflex
38 /Udieresis/Yacute/Thorn/germandbls
39 % 0340 (224)
40 /agrave/aacute/acircumflex/atilde
41 /adieresis/aring/ae/ccedilla
42 /egrave/eacute/ecircumflex/edieresis
43 /igrave/iacute/icircumflex/idieresis
44 /eth/ntilde/ograve/oacute
45 /ocircumflex/otilde/odieresis/divide
46 /oslash/ugrave/uacute/ucircumflex
47 /udieresis/yacute/thorn/ydieresis
48 256 packedarray def
49 }ifelse
50
51 /reencodeFontISO{ %def
52 dup
53 length 12 add dict % Make a new font (a new dict the same size
54 % as the old one) with room for our new symbols.
55
56 begin % Make the new font the current dictionary.
57
58 % Copy each of the symbols from the old dictionary
59 % to the new one except for the font ID.
60 {1 index/FID ne{def}{pop pop}ifelse}forall
61
62 % Override the encoding with the ISOLatin1 encoding.
63 currentdict/FontType get 0 ne{/Encoding ISOLatin1Encoding def}if
64
65 % Use the font's bounding box to determine the ascent, descent,
66 % and overall height; don't forget that these values have to be
67 % transformed using the font's matrix.
68
69 % ^ (x2 y2)
70 % | |
71 % | v
72 % | +----+ - -
73 % | | | ^
74 % | | | | Ascent (usually > 0)
75 % | | | |
76 % (0 0) -> +--+----+-------->
77 % | | |
78 % | | v Descent (usually < 0)
79 % (x1 y1) --> +----+ - -
80
81 currentdict/FontType get 0 ne
82 {/FontBBox load aload pop % -- x1 y1 x2 y2
83 FontMatrix transform/Ascent exch def pop
84 FontMatrix transform/Descent exch def pop}
85 {/PrimaryFont FDepVector 0 get def
86 PrimaryFont/FontBBox get aload pop
87 PrimaryFont/FontMatrix get transform/Ascent exch def pop
88 PrimaryFont/FontMatrix get transform/Descent exch def pop}ifelse
89
90 /FontHeight Ascent Descent sub def % use `sub' because descent < 0
91
92 % Define these in case they're not in the FontInfo
93 % (also, here they're easier to get to).
94 /UnderlinePosition Descent 0.70 mul def
95 /OverlinePosition Descent UnderlinePosition sub Ascent add def
96 /StrikeoutPosition Ascent 0.30 mul def
97 /LineThickness FontHeight 0.05 mul def
98 /Xshadow FontHeight 0.08 mul def
99 /Yshadow FontHeight -0.09 mul def
100 /SpaceBackground Descent neg UnderlinePosition add def
101 /XBox Descent neg def
102 /YBox LineThickness 0.7 mul def
103
104 currentdict % Leave the new font on the stack
105 end % Stop using the font as the current dictionary.
106 definefont % Put the font into the font dictionary
107 pop % Discard the returned font.
108 }bind def
109
110 % Font definition
111 /DefFont{findfont exch scalefont reencodeFontISO}def
112
113 % Font selection
114 /F{
115 findfont
116 dup/Ascent get/Ascent exch def
117 dup/Descent get/Descent exch def
118 dup/FontHeight get/FontHeight exch def
119 dup/UnderlinePosition get/UnderlinePosition exch def
120 dup/OverlinePosition get/OverlinePosition exch def
121 dup/StrikeoutPosition get/StrikeoutPosition exch def
122 dup/LineThickness get/LineThickness exch def
123 dup/Xshadow get/Xshadow exch def
124 dup/Yshadow get/Yshadow exch def
125 dup/SpaceBackground get/SpaceBackground exch def
126 dup/XBox get/XBox exch def
127 dup/YBox get/YBox exch def
128 setfont
129 }def
130
131 /FG/setrgbcolor load def
132
133 /bg false def
134 /BG{
135 dup/bg exch def
136 {[4 1 roll]}
137 {[1.0 1.0 1.0]}
138 ifelse
139 /bgcolor exch def
140 }def
141
142 % B width C
143 % +-----------+
144 % | Ascent (usually > 0)
145 % A + +
146 % | Descent (usually < 0)
147 % +-----------+
148 % E width D
149
150 /dobackground{ % width --
151 currentpoint % -- width x y
152 gsave
153 newpath
154 moveto % A (x y)
155 0 Ascent rmoveto % B
156 dup 0 rlineto % C
157 0 Descent Ascent sub rlineto % D
158 neg 0 rlineto % E
159 closepath
160 FillBgColor
161 grestore
162 }def
163
164 /eolbg{ % dobackground until right margin
165 PrintWidth % -- x-eol
166 currentpoint pop % -- cur-x
167 sub % -- width until eol
168 dobackground
169 }def
170
171 /PSL{bg{eolbg}if 0 currentpoint exch pop LineHeight sub moveto}def
172 /PLN{PrintLineNumber{doLineNumber}if}def
173
174 /SL{PSL isLineStep pop}def % Soft Linefeed
175
176 /HL{PSL PLN}def % Hard Linefeed
177
178 % Some debug
179 /dcp{currentpoint exch 40 string cvs print(, )print =}def
180 /dp{print 2 copy exch 40 string cvs print(, )print =}def
181
182 /W{
183 ( )stringwidth % Get the width of a space in the current font.
184 pop % Discard the Y component.
185 mul % Multiply the width of a space
186 % by the number of spaces to plot
187 bg{dup dobackground}if
188 0 rmoveto
189 }def
190
191 /Effect 0 def
192 /EF{/Effect exch def}def
193
194 % stack: string |- --
195 % effect: 1 - underline 2 - strikeout 4 - overline
196 % 8 - shadow 16 - box 32 - outline
197 /S{
198 /xx currentpoint dup Descent add/yy exch def
199 Ascent add/YY exch def def
200 dup stringwidth pop xx add/XX exch def
201 Effect 8 and 0 ne{
202 /yy yy Yshadow add def
203 /XX XX Xshadow add def
204 }if
205 bg{
206 true
207 Effect 16 and 0 ne
208 {SpaceBackground doBox}
209 {xx yy XX YY doRect}
210 ifelse
211 }if % background
212 Effect 16 and 0 ne{false 0 doBox}if % box
213 Effect 8 and 0 ne{dup doShadow}if % shadow
214 Effect 32 and 0 ne
215 {true doOutline} % outline
216 {show} % normal text
217 ifelse
218 Effect 1 and 0 ne{UnderlinePosition Hline}if % underline
219 Effect 2 and 0 ne{StrikeoutPosition Hline}if % strikeout
220 Effect 4 and 0 ne{OverlinePosition Hline}if % overline
221 }bind def
222
223 % stack: position |- --
224 /Hline{
225 currentpoint exch pop add dup
226 gsave
227 newpath
228 xx exch moveto
229 XX exch lineto
230 closepath
231 LineThickness setlinewidth stroke
232 grestore
233 }bind def
234
235 % stack: fill-or-not delta |- --
236 /doBox{
237 /dd exch def
238 xx XBox sub dd sub yy YBox sub dd sub
239 XX XBox add dd add YY YBox add dd add
240 doRect
241 }bind def
242
243 % stack: fill-or-not lower-x lower-y upper-x upper-y |- --
244 /doRect{
245 /rYY exch def
246 /rXX exch def
247 /ryy exch def
248 /rxx exch def
249 gsave
250 newpath
251 rXX rYY moveto
252 rxx rYY lineto
253 rxx ryy lineto
254 rXX ryy lineto
255 closepath
256 % top of stack: fill-or-not
257 {FillBgColor}
258 {LineThickness setlinewidth stroke}ifelse
259 grestore
260 }bind def
261
262 % stack: string |- --
263 /doShadow{
264 gsave
265 Xshadow Yshadow rmoveto
266 false doOutline
267 grestore
268 }bind def
269
270 /st 1 string def
271
272 % stack: string fill-or-not |- --
273 /doOutline{
274 /-fillp- exch def
275 /-ox- currentpoint/-oy- exch def def
276 gsave
277 LineThickness setlinewidth
278 {st 0 3 -1 roll put
279 st dup true charpath
280 -fillp- {gsave FillBgColor grestore}if
281 stroke stringwidth
282 -oy- add/-oy- exch def
283 -ox- add/-ox- exch def
284 -ox- -oy- moveto
285 }forall
286 grestore
287 -ox- -oy- moveto
288 }bind def
289
290 % stack: --
291 /FillBgColor{bgcolor aload pop setrgbcolor fill}bind def
292
293 % stack: -- |- boolean
294 /isLineStep{
295 SyncLineZebra
296 {PLScounter 0 gt % or zebra
297 {/PLScounter PLScounter 1 sub def PLScounter 0 eq}
298 {false}ifelse
299 PrintLineStep 1 gt
300 {/PrintLineStep PrintLineStep 1 sub def}
301 {/PrintLineStep ZebraHeight def
302 /PLScounter PrintLineStart def}ifelse}
303 {LineNumber PrintLineStart sub PrintLineStep mod 0 eq}ifelse % or line step
304 }def
305
306 % stack: --
307 /doLineNumber{
308 /LineNumber where
309 {pop
310 isLineStep % or line step
311 LineNumber Lines ge or % or last line
312 {currentfont
313 gsave
314 0.0 0.0 0.0 setrgbcolor
315 /L0 findfont setfont
316 LineNumber Lines ge
317 {(end )}
318 {LineNumber 6 string cvs( )strcat}ifelse
319 dup stringwidth pop neg 0 rmoveto
320 show
321 grestore
322 setfont}if
323 /LineNumber LineNumber 1 add def
324 }if
325 }def
326
327 % stack: color-specifier |- --
328 /SetColor{dup type/realtype eq{setgray}{aload pop setrgbcolor}ifelse}def
329
330 % stack: --
331 /printZebra{
332 gsave
333 ZebraColor SetColor
334 /double-zebra ZebraHeight ZebraHeight add def
335 /yiter double-zebra LineHeight mul neg def
336 /xiter PrintWidth InterColumn add def
337 /zebra-line LinesPrinted def
338 NumberOfColumns{LinesPerColumn doColumnZebra xiter 0 rmoveto}repeat
339 grestore
340 }def
341
342 % stack: lines-per-column |- --
343 /doColumnZebra{
344 /lpc exch def
345 gsave
346 ZebraFollow 1 and 0 ne{
347 /H ZebraHeight zebra-line ZebraHeight mod sub def
348 /lpc lpc H sub def
349 zebra-line double-zebra mod ZebraHeight lt
350 {H doZebra % "black" stripe followed by a "white" stripe
351 /lpc lpc ZebraHeight sub def
352 H ZebraHeight add}
353 {H}ifelse % "white" stripe
354 LineHeight mul neg 0 exch rmoveto
355 /zebra-line zebra-line LinesPerColumn add def
356 }if
357 lpc dup double-zebra idiv{ZebraHeight doZebra 0 yiter rmoveto}repeat
358 double-zebra mod dup 0 le{pop}
359 {dup ZebraHeight gt ZebraFollow 2 and 0 ne or{pop ZebraHeight}if doZebra}ifelse
360 grestore
361 }def
362
363 % stack: zebra-height (in lines) |- --
364 /doZebra{
365 /zh exch 0.05 sub LineHeight mul def
366 gsave
367 0 LineHeight 0.65 mul rmoveto
368 PrintWidth 0 rlineto
369 0 zh neg rlineto
370 PrintWidth neg 0 rlineto
371 0 zh rlineto
372 fill
373 grestore
374 }def
375
376 % stack: --
377 /printBackground{
378 /BackgroundColor where{
379 pop gsave BackgroundColor SetColor
380 NumberOfColumns{
381 gsave
382 0 LineHeight 0.65 mul rmoveto
383 PrintWidth 0 rlineto
384 0 PrintHeight neg rlineto
385 PrintWidth neg 0 rlineto
386 0 PrintHeight rlineto
387 fill
388 grestore
389 PrintWidth InterColumn add 0 rmoveto
390 }repeat
391 grestore
392 }if
393 }def
394
395 % tx ty rotation xscale yscale xpos ypos BeginBackImage
396 /BeginBackImage{
397 /-save-image- save def
398 /showpage{}def
399 translate
400 scale
401 rotate
402 translate
403 }def
404
405 /EndBackImage{-save-image- restore}def
406
407 % string fontsize fontname rotation gray xpos ypos ShowBackText
408 /ShowBackText{
409 gsave
410 translate
411 setgray
412 rotate
413 findfont exch dup/-offset- exch -0.25 mul def scalefont setfont
414 0 -offset- moveto
415 /-saveLineThickness- LineThickness def
416 /LineThickness 1 def
417 false doOutline
418 /LineThickness -saveLineThickness- def
419 grestore
420 }def
421
422 /SetPageSize{
423 BMark/PageSize[PageWidth LandscapePageHeight LandscapeMode{exch}if]EMark setpagedevice
424 }def
425
426 /BeginDoc{
427 % ---- Remember space width of the normal text font `f0'.
428 /SpaceWidth/f0 findfont setfont( )stringwidth pop def
429 % ---- save the state of the document (useful for ghostscript!)
430 /docState save def
431 % ---- [andrewi] set PageSize based on chosen dimensions
432 UseSetpagedevice{
433 WarnPaperSize{SetPageSize}{mark{SetPageSize}stopped cleartomark}ifelse
434 }if
435 /ColumnWidth PrintWidth InterColumn add def
436 % ---- define where printing will start
437 /f0 F % this installs Ascent
438 /PrintStartY PrintHeight Ascent sub def
439 /ColumnIndex 1 def
440 /N-Up-Counter N-Up-End 1 sub def
441 /PLScounter PrintLineStart def
442 }def
443
444 /EndDoc{
445 % ---- restore the state of the document (useful for ghostscript!)
446 docState restore
447 }def
448
449 /BeginDSCPage{
450 % ---- when 1st column, save the state of the page
451 ColumnIndex 1 eq{/pageState save def}if
452 % ---- save the state of the column
453 /columnState save def
454 }def
455
456 /PrintHeaderWidth PrintOnlyOneHeader{PrintPageWidth}{PrintWidth}ifelse def
457
458 /BeginPage{
459 /LinesPrinted exch def
460 % ---- when 1st column, print all background effects
461 ColumnIndex 1 eq{
462 0 PrintStartY moveto % move to where printing will start
463 printBackground
464 Zebra{printZebra}if
465 printGlobalBackground
466 printLocalBackground
467 }if
468 PrintHeader{
469 PrintOnlyOneHeader{ColumnIndex 1 eq}{true}ifelse{
470 PrintHeaderFrame{HeaderFrame}if
471 HeaderText
472 }if
473 }if
474 0 PrintStartY moveto % move to where printing will start
475 /LineNumber where
476 {pop
477 SyncLineZebra
478 {/H PageNumber 1 sub NumberOfColumns mul ColumnIndex 1 sub add
479 LinesPerColumn mul ZebraHeight mod def
480 /PLScounter H PrintLineStart ge{0}{PrintLineStart H sub}ifelse def
481 /PrintLineStep ZebraHeight H sub def}if}if
482 PLN
483 }def
484
485 /EndPage{bg{eolbg}if}def
486
487 /EndDSCPage{
488 ColumnIndex NumberOfColumns eq{
489 % ---- restore the state of the page
490 pageState restore
491 /ColumnIndex 1 def
492 % ---- N-up printing
493 N-Up 1 gt{
494 N-Up-Counter 0 gt
495 {% ---- Next page on same row
496 /N-Up-Counter N-Up-Counter 1 sub def
497 N-Up-XColumn N-Up-YColumn}
498 {% ---- Next page on next line
499 /N-Up-Counter N-Up-End 1 sub def
500 N-Up-XLine N-Up-YLine}ifelse
501 translate
502 }if
503 }{ % else
504 % ---- restore the state of the current column
505 columnState restore
506 % ---- and translate to the next column
507 ColumnWidth 0 translate
508 /ColumnIndex ColumnIndex 1 add def
509 }ifelse
510 }def
511
512 % stack: number-of-pages-per-sheet |- --
513 /BeginSheet{
514 /sheetState save def
515 /pages-per-sheet exch def
516
517 % ---- translate to bottom-right corner of Portrait page
518 LandscapeMode{
519 LandscapePageHeight 0 translate
520 90 rotate
521 }if
522 % ---- [jack] Kludge: my ghostscript window is 21x27.7 instead of 21x29.7
523 /JackGhostscript where{pop 1 27.7 29.7 div scale}if
524 UpsideDown{PageWidth LandscapePageHeight translate 180 rotate}if
525 % ---- N-Up printing
526 N-Up 1 gt{
527 % ---- landscape
528 N-Up-Landscape{
529 PageWidth 0 translate
530 90 rotate
531 }if
532 N-Up-Margin dup translate
533 % ---- scale
534 LandscapeMode{
535 /HH PageWidth def
536 /WW LandscapePageHeight def
537 }{
538 /HH LandscapePageHeight def
539 /WW PageWidth def
540 }ifelse
541 /xx 0 def
542 N-Up-Landscape{
543 /ww WW WW mul N-Up-Lines HH mul div def
544 /cc HH N-Up-Columns N-Up-Missing add div def
545 ww cc gt{/xx WW def/WW cc ww div WW mul def/xx xx WW sub def}if
546 }{
547 /hh HH N-Up-Columns N-Up-Missing add div def
548 /cc HH N-Up-Lines div def
549 hh cc gt{/xx WW def/WW cc hh div WW mul def/xx xx WW sub def}if
550 }ifelse
551 WW N-Up-Margin sub N-Up-Margin sub
552 N-Up-Landscape
553 {N-Up-Lines div HH}
554 {N-Up-Columns N-Up-Missing add div WW}ifelse
555 div dup scale
556 LandscapeMode{/yy 0 def}{/yy xx def/xx 0 def}ifelse
557 xx N-Up-Repeat 1 sub LandscapePageHeight mul yy add translate
558 % ---- go to start position in page matrix
559 N-Up-XStart N-Up-Missing 0.5 mul
560 LandscapeMode
561 {LandscapePageHeight mul N-Up-YStart add}
562 {PageWidth mul add N-Up-YStart}ifelse
563 translate
564 }if
565 % ---- translate to lower left corner of TEXT
566 LeftMargin BottomMargin translate
567
568 % ---- N-up printing
569 N-Up 1 gt N-Up-Border and pages-per-sheet 0 gt and{
570 % ---- page border
571 gsave
572 0 setgray
573 LeftMargin neg BottomMargin neg moveto
574 N-Up-Repeat
575 {N-Up-End
576 {gsave
577 PageWidth 0 rlineto
578 0 LandscapePageHeight rlineto
579 PageWidth neg 0 rlineto
580 closepath stroke
581 grestore
582 /pages-per-sheet pages-per-sheet 1 sub def
583 pages-per-sheet 0 le{exit}if
584 N-Up-XColumn N-Up-YColumn rmoveto
585 }repeat
586 pages-per-sheet 0 le{exit}if
587 N-Up-XLine N-Up-XColumn sub N-Up-YLine rmoveto
588 }repeat
589 grestore
590 }if
591 }def
592
593 /EndSheet{
594 showpage
595 sheetState restore
596 }def
597
598 /SetHeaderLines{ % nb-lines --
599 /HeaderLines exch def
600 % ---- bottom up
601 HeaderPad
602 HeaderLines 1 sub HeaderLineHeight mul add
603 HeaderTitleLineHeight add
604 HeaderPad add
605 /HeaderHeight exch def
606 }def
607
608 % |---------|
609 % | tm |
610 % |---------|
611 % | header |
612 % |-+-------| <-- (x y)
613 % | ho |
614 % |---------|
615 % | text |
616 % |-+-------| <-- (0 0)
617 % | bm |
618 % |---------|
619
620 % -- |- x y
621 /HeaderFrameStart{0 PrintHeight HeaderOffset add}def
622
623 /HeaderFramePath{
624 PrintHeaderWidth 0 rlineto
625 0 HeaderHeight rlineto
626 PrintHeaderWidth neg 0 rlineto
627 0 HeaderHeight neg rlineto
628 }def
629
630 /HeaderFrame{
631 gsave
632 0.4 setlinewidth
633 % ---- fill a black rectangle (the shadow of the next one)
634 HeaderFrameStart moveto
635 1 -1 rmoveto
636 HeaderFramePath
637 0 setgray fill
638 % ---- do the next rectangle ...
639 HeaderFrameStart moveto
640 HeaderFramePath
641 gsave 0.9 setgray fill grestore % filled with grey
642 gsave 0 setgray stroke grestore % drawn with black
643 grestore
644 }def
645
646 /HeaderStart{
647 HeaderFrameStart
648 exch HeaderPad add exch % horizontal pad
649 % ---- bottom up
650 HeaderPad add % vertical pad
651 HeaderDescent sub
652 HeaderLineHeight HeaderLines 1 sub mul add
653 }def
654
655 /strcat{
656 dup length 3 -1 roll dup length dup 4 -1 roll add string dup
657 0 5 -1 roll putinterval
658 dup 4 2 roll exch putinterval
659 }def
660
661 /pagenumberstring{
662 PageNumber 32 string cvs
663 ShowNofN{(/)strcat PageCount 32 string cvs strcat}if
664 }def
665
666 /HeaderText{
667 HeaderStart moveto
668
669 HeaderLinesRight HeaderLinesLeft % -- rightLines leftLines
670
671 % ---- hack: `PN 1 and' == `PN 2 modulo'
672
673 % ---- if even page number and duplex, then exchange left and right
674 PageNumber 1 and 0 eq SwitchHeader and{exch}if
675
676 { % ---- process the left lines
677 aload pop
678 exch F
679 gsave
680 dup xcheck{exec}if
681 show
682 grestore
683 0 HeaderLineHeight neg rmoveto
684 }forall
685
686 HeaderStart moveto
687
688 { % ---- process the right lines
689 aload pop
690 exch F
691 gsave
692 dup xcheck{exec}if
693 dup stringwidth pop
694 PrintHeaderWidth exch sub HeaderPad 2 mul sub 0 rmoveto
695 show
696 grestore
697 0 HeaderLineHeight neg rmoveto
698 }forall
699 }def
700
701 /ReportFontInfo{
702 2 copy
703 /t0 3 1 roll DefFont
704 /t0 F
705 /lh FontHeight def
706 /sw( )stringwidth pop def
707 /aw(01234567890abcdefghijklmnopqrstuvwxyz)dup length exch
708 stringwidth pop exch div def
709 /t1 12/Helvetica-Oblique DefFont
710 /t1 F
711 gsave
712 (languagelevel = )show
713 languagelevel 32 string cvs show
714 grestore
715 0 FontHeight neg rmoveto
716 gsave
717 (For )show
718 128 string cvs show
719 ( )show
720 32 string cvs show
721 ( point, the line height is )show
722 lh 32 string cvs show
723 (, the space width is )show
724 sw 32 string cvs show
725 (,)show
726 grestore
727 0 FontHeight neg rmoveto
728 gsave
729 (and a crude estimate of average character width is )show
730 aw 32 string cvs show
731 (.)show
732 grestore
733 0 FontHeight neg rmoveto
734 }def
735
736 % cm to point
737 /cm{72 mul 2.54 div}def
738
739 /ReportAllFontInfo{
740 % key = font name value = font dictionary
741 FontDirectory{pop 10 exch ReportFontInfo}forall
742 }def
743
744 % 3 cm 20 cm moveto 10/Courier ReportFontInfo showpage
745 % 3 cm 20 cm moveto ReportAllFontInfo showpage
746
747 % === END ps-print prologue 1