1 --- gfontview-0.5.0/ps.h.orig Sun Jun 25 14:17:29 2000
2 +++ gfontview-0.5.0/ps.h Tue Nov 25 13:29:38 2003
6 const char *text_samples = "\
7 -/TextSamplerDict 40 dict def
10 -/linewidth 7 Inch def
16 -/DoTitle { % fontname DoTitle
17 - /Helvetica findfont 18 scalefont setfont
20 - ( at ) show fontsize buf cvs show ( points, spacing = ) show
21 - spacing buf cvs show
24 -/DoSamples { % fontname fontsize spacing DoSamples
29 - fontname findfont fontsize scalefont setfont
30 - /newline {/yline yline fontsize spacing mul sub def LM yline moveto} def
31 - /breakwidth wordbreak stringwidth pop def
33 - /lastwordbreak 0 def
35 - /restoftext textstring def
39 - { restoftext wordbreak search
41 - /nextword exch def pop
42 - /restoftext exch def
43 - /wordwidth nextword stringwidth pop def
45 - curwidth wordwidth add linewidth gt
47 - textstring startchar lastwordbreak startchar sub getinterval
49 - /startchar lastwordbreak def
50 - /curwidth wordwidth breakwidth add def
53 - /curwidth curwidth wordwidth breakwidth add add def
56 - /lastwordbreak lastwordbreak nextword length 1 add add def
61 - /lastchar textstring length def
62 - textstring startchar lastchar startchar sub getinterval show
65 +/TextSamplerDict 40 dict def\n\
66 +TextSamplerDict begin\n\
67 +/Inch {72 mul} def\n\
68 +/linewidth 7 Inch def\n\
69 +/yline 9.7 Inch def\n\
71 +/wordbreak ( ) def\n\
74 +/DoTitle { % fontname DoTitle\n\
75 + /Helvetica findfont 18 scalefont setfont\n\
76 + LM 10.5 Inch moveto\n\
78 + ( at ) show fontsize buf cvs show ( points, spacing = ) show\n\
79 + spacing buf cvs show\n\
82 +/DoSamples { % fontname fontsize spacing DoSamples\n\
83 + /spacing exch def\n\
84 + /fontsize exch def\n\
85 + /fontname exch def\n\
87 + fontname findfont fontsize scalefont setfont\n\
88 + /newline {/yline yline fontsize spacing mul sub def LM yline moveto} def\n\
89 + /breakwidth wordbreak stringwidth pop def\n\
91 + /lastwordbreak 0 def\n\
93 + /restoftext textstring def\n\
97 + { restoftext wordbreak search\n\
99 + /nextword exch def pop\n\
100 + /restoftext exch def\n\
101 + /wordwidth nextword stringwidth pop def\n\
103 + curwidth wordwidth add linewidth gt\n\
105 + textstring startchar lastwordbreak startchar sub getinterval\n\
107 + /startchar lastwordbreak def\n\
108 + /curwidth wordwidth breakwidth add def\n\
111 + /curwidth curwidth wordwidth breakwidth add add def\n\
114 + /lastwordbreak lastwordbreak nextword length 1 add add def\n\
119 + /lastchar textstring length def\n\
120 + textstring startchar lastchar startchar sub getinterval show\n\
127 const char *check_type42 = "\
130 - /Helvetica findfont 14 scalefont setfont
132 - (Your printer or PostScript interpreter does not support PostScript Level 2) show
137 -42 /FontType resourcestatus not
139 - /Helvetica findfont 14 scalefont setfont
141 - (Your printer or PostScript interpreter does not support Type 42 fonts) show
146 +languagelevel 2 lt\n\
148 + /Helvetica findfont 14 scalefont setfont\n\
150 + (Your printer or PostScript interpreter does not support PostScript Level 2) show\n\
155 +42 /FontType resourcestatus not\n\
157 + /Helvetica findfont 14 scalefont setfont\n\
159 + (Your printer or PostScript interpreter does not support Type 42 fonts) show\n\
167 const char *phrase_samples = "\
168 -/PhraseSamplerDict 20 dict def
169 -PhraseSamplerDict begin
174 -/T /Helvetica findfont 10 scalefont def
175 -/T6 /Helvetica findfont 6 scalefont def
176 -/Header { % text height Header
177 - RM exch moveto T6 setfont dup stringwidth pop neg 0 rmoveto show
179 -/FontName { % fontname fontfile height FontName
185 - T setfont FName Temp cvs show
187 - T6 setfont FFile show
189 -/FontSample { % fontname size height FontSample
194 - LM 160 add y moveto
197 - FName findfont FSize scalefont setfont
201 - LM 160 add y moveto
202 - T6 setfont (Error: ) show
203 - $error /errorname get Temp cvs show
205 - $error /command get Temp cvs show
212 +/PhraseSamplerDict 20 dict def\n\
213 +PhraseSamplerDict begin\n\
214 +/Inch {72 mul} def\n\
217 +/Temp 64 string def\n\
218 +/T /Helvetica findfont 10 scalefont def\n\
219 +/T6 /Helvetica findfont 6 scalefont def \n\
220 +/Header { % text height Header\n\
221 + RM exch moveto T6 setfont dup stringwidth pop neg 0 rmoveto show\n\
223 +/FontName { % fontname fontfile height FontName\n\
229 + T setfont FName Temp cvs show\n\
230 + LM y 8 sub moveto\n\
231 + T6 setfont FFile show\n\
233 +/FontSample { % fontname size height FontSample\n\
238 + LM 160 add y moveto\n\
241 + FName findfont FSize scalefont setfont \n\
242 + StringSample show\n\
245 + LM 160 add y moveto\n\
246 + T6 setfont (Error: ) show\n\
247 + $error /errorname get Temp cvs show\n\
249 + $error /command get Temp cvs show\n\
259 const char *size_samples = "\
260 -/SizeSamplerDict 40 dict def
261 -SizeSamplerDict begin
264 - (ABCDEFGHIJKLMNOPQRSTUVWXYZ)
265 - (abcdefghijklmnopqrstuvwxyz)
266 - (0123456789<=>:;?@!\"#$%&')
267 - (\\( \\)*+,-./ [ \\\\ ]^_`{|}~)
273 - 8 10 12 14 20 24 28
276 -/infofont /Helvetica findfont 10 scalefont def
279 -/DoTitle { % fontname DoTitle
280 - % Write the font name on top of the page
281 - /Helvetica findfont 18 scalefont setfont
283 - exch 8 Inch exch sub 2 div exch
287 -/DoSamples { % font DoSamples
288 - % Make the font samples
290 - /testfont fontname findfont def
297 - testfont size scalefont setfont
298 - currentpoint translate % start of line
306 - 0 1.2 size mul rmoveto % add 30% of the size vertically
310 - currentpoint % end of line
311 - newpath 0 0 moveto lineto
312 - currentpoint stroke % leave end of line pos in stack
314 - % Print the font size in the middle of the line
315 - dup % leave y in the stack (x is 0)
317 - size msg cvs dup stringwidth % Push string 'n' and its size on the stack
318 - 4 -1 roll exch sub 2 div % Stack is 'string width ypos'
319 - exch 5 add neg exch moveto show % Move to the left and print
321 - moveto % take end of line pos from stack
322 - 0 15 rmoveto % Add vertical space between groups
326 +/SizeSamplerDict 40 dict def\n\
327 +SizeSamplerDict begin\n\
330 + (ABCDEFGHIJKLMNOPQRSTUVWXYZ)\n\
331 + (abcdefghijklmnopqrstuvwxyz)\n\
332 + (0123456789<=>:;?@!\"#$%&')\n\
333 + (\\( \\)*+,-./ [ \\\\ ]^_`{|}~)\n\
339 + 8 10 12 14 20 24 28\n\
342 +/infofont /Helvetica findfont 10 scalefont def\n\
343 +/msg 8 string def\n\
344 +/Inch {72 mul} def\n\
345 +/DoTitle { % fontname DoTitle\n\
346 + % Write the font name on top of the page\n\
347 + /Helvetica findfont 18 scalefont setfont\n\
349 + exch 8 Inch exch sub 2 div exch\n\
350 + 10.5 Inch exch sub\n\
353 +/DoSamples { % font DoSamples\n\
354 + % Make the font samples\n\
355 + /fontname exch def\n\
356 + /testfont fontname findfont def\n\
363 + testfont size scalefont setfont\n\
364 + currentpoint translate % start of line\n\
372 + 0 1.2 size mul rmoveto % add 30% of the size vertically\n\
373 + } forall % Strings\n\
376 + currentpoint % end of line\n\
377 + newpath 0 0 moveto lineto\n\
378 + currentpoint stroke % leave end of line pos in stack\n\
380 + % Print the font size in the middle of the line\n\
381 + dup % leave y in the stack (x is 0)\n\
382 + infofont setfont\n\
383 + size msg cvs dup stringwidth % Push string 'n' and its size on the stack\n\
384 + 4 -1 roll exch sub 2 div % Stack is 'string width ypos'\n\
385 + exch 5 add neg exch moveto show % Move to the left and print\n\
387 + moveto % take end of line pos from stack\n\
388 + 0 15 rmoveto % Add vertical space between groups\n\
389 + } forall % Sizes\n\
396 const char *map_samples = "\
397 -/MapSamplerDict 40 dict def
398 -MapSamplerDict begin
399 -/T /Helvetica findfont 10 scalefont def
400 -/T6 /Times-Roman findfont 6 scalefont def
403 -/Base 16 def % char code output base
404 -/TempEncoding [ 256 { /.notdef } repeat ] def
405 -/ISOLatin1Dict 256 dict def
406 -ISOLatin1Encoding { ISOLatin1Dict exch true put } forall
407 -/min { 2 copy gt { exch } if pop } bind def
410 - /S (_) dup 0 C put def
411 - /N F /Encoding get C get def
412 - /W F setfont S stringwidth pop def
414 - 0 -20 moveto N Temp cvs show
416 - W 0.0005 add Temp cvs 0 5 getinterval show
419 - 0 0 moveto F24 setfont S show
420 - /W S stringwidth pop def
421 - 0 -6 moveto 0 24 lineto
422 - W -6 moveto W 24 lineto
423 - -3 0 moveto W 3 add 0 lineto
424 - 0 setlinewidth stroke
427 -/DoTitle { % fontname DoTitle
428 - /Helvetica findfont 18 scalefont setfont
430 - exch 8 Inch exch sub 2 div exch
434 -/Header { % header Header
435 - 7.6 Inch 10.7 Inch moveto T setfont dup stringwidth pop neg 0 rmoveto show
437 -/DoBlock { % firstcode lastcode DoBlock
438 - /FirstCode 2 index def
441 - /Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def
443 - Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate
448 -/FontShow0 { % fontname FontShow0
449 - /FName exch def % font name
450 - /F FName findfont def
453 - ISOLatin1Encoding {
454 - dup F /CharStrings get exch known {
455 - dup Done exch known { pop } { dup Done exch true put } ifelse
458 - F /CharStrings get {
459 - pop dup ISOLatin1Dict exch known { pop } if
463 - 1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse
465 - dup /Encoding NewEncoding put
468 - /F24 F 24 scalefont def
471 - 0 NewEncoding length 1 sub DoBlock
473 -/FontShowV { % encoding fontname FontShowV
475 - /NewEncoding exch def
476 - /F FName findfont def
478 - 1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse
480 - dup /Encoding NewEncoding put
483 - /F24 F 24 scalefont def
486 - 0 NewEncoding length 1 sub DoBlock
489 +/MapSamplerDict 40 dict def\n\
490 +MapSamplerDict begin\n\
491 +/T /Helvetica findfont 10 scalefont def\n\
492 +/T6 /Times-Roman findfont 6 scalefont def\n\
493 +/Temp 64 string def\n\
494 +/Inch {72 mul} def\n\
495 +/Base 16 def % char code output base\n\
496 +/TempEncoding [ 256 { /.notdef } repeat ] def\n\
497 +/ISOLatin1Dict 256 dict def\n\
498 +ISOLatin1Encoding { ISOLatin1Dict exch true put } forall\n\
499 +/min { 2 copy gt { exch } if pop } bind def\n\
502 + /S (_) dup 0 C put def\n\
503 + /N F /Encoding get C get def\n\
504 + /W F setfont S stringwidth pop def\n\
506 + 0 -20 moveto N Temp cvs show\n\
508 + W 0.0005 add Temp cvs 0 5 getinterval show\n\
511 + 0 0 moveto F24 setfont S show\n\
512 + /W S stringwidth pop def\n\
513 + 0 -6 moveto 0 24 lineto\n\
514 + W -6 moveto W 24 lineto\n\
515 + -3 0 moveto W 3 add 0 lineto\n\
516 + 0 setlinewidth stroke\n\
519 +/DoTitle { % fontname DoTitle\n\
520 + /Helvetica findfont 18 scalefont setfont\n\
522 + exch 8 Inch exch sub 2 div exch\n\
523 + 10.7 Inch exch sub\n\
526 +/Header { % header Header\n\
527 + 7.6 Inch 10.7 Inch moveto T setfont dup stringwidth pop neg 0 rmoveto show\n\
529 +/DoBlock { % firstcode lastcode DoBlock\n\
530 + /FirstCode 2 index def\n\
533 + /Xn I FirstCode sub 16 mod def /Yn I FirstCode sub 16 idiv def\n\
535 + Xn 36 mul 9 add Yn -56 mul 9.5 Inch add translate\n\
540 +/FontShow0 { % fontname FontShow0\n\
541 + /FName exch def % font name\n\
542 + /F FName findfont def\n\
543 + /Done 256 dict def\n\
545 + ISOLatin1Encoding {\n\
546 + dup F /CharStrings get exch known {\n\
547 + dup Done exch known { pop } { dup Done exch true put } ifelse\n\
548 + } { pop } ifelse\n\
550 + F /CharStrings get {\n\
551 + pop dup ISOLatin1Dict exch known { pop } if\n\
554 + F length dict F {\n\
555 + 1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
557 + dup /Encoding NewEncoding put\n\
558 + /* exch definefont\n\
560 + /F24 F 24 scalefont def\n\
561 + 70 160 translate\n\
563 + 0 NewEncoding length 1 sub DoBlock\n\
565 +/FontShowV { % encoding fontname FontShowV\n\
566 + /FName exch def \n\
567 + /NewEncoding exch def\n\
568 + /F FName findfont def\n\
569 + F length dict F {\n\
570 + 1 index /FID eq { pop pop } { 2 index 3 1 roll put } ifelse\n\
572 + dup /Encoding NewEncoding put\n\
573 + /* exch definefont\n\
575 + /F24 F 24 scalefont def\n\
576 + 70 160 translate\n\
578 + 0 NewEncoding length 1 sub DoBlock\n\