|
|
1.1 root 1: #
2: # Shell library - for building devLatin1 tables.
3: #
4: # The full ISO Latin1 alphabet appeared in Adobe's interpreter sometime
5: # around Version 50.0. Prior to that ROM resident Type 1 text fonts were
6: # missing 18 characters that are now part of the Latin1 standard. Width
7: # tables will not build on printers that lack full Latin1 support. Error
8: # message will likely reflect a missing ISOLatin1Encoding array.
9: #
10:
11: RESOLUTION=720
12: UNITWIDTH=10
13:
14: OCTALESCAPES=${OCTALESCAPES:-160} # <= code means add \0ddd names
15: DOWNLOADVECTOR=FALSE # TRUE can mean incomplete tables
16:
17: #
18: # BuiltinTables returns command lines that generate PostScript programs
19: # for building a typesetter description file and font width tables for
20: # a relatively standard collection of fonts. Use awk to select a command
21: # line or modify an existing command to build a width table for a new
22: # font.
23: #
24:
25: BuiltinTables() {
26: cat <<-'//End of BuiltinTables'
27: Proportional R Times-Roman
28: Proportional I Times-Italic
29: Proportional B Times-Bold
30: Proportional BI Times-BoldItalic
31: Proportional AB AvantGarde-Demi
32: Proportional AI AvantGarde-BookOblique
33: Proportional AR AvantGarde-Book
34: Proportional AX AvantGarde-DemiOblique
35: Proportional H Helvetica
36: Proportional HB Helvetica-Bold
37: Proportional HI Helvetica-Oblique
38: Proportional HX Helvetica-BoldOblique
39: Proportional Hb Helvetica-Narrow-Bold
40: Proportional Hi Helvetica-Narrow-Oblique
41: Proportional Hr Helvetica-Narrow
42: Proportional Hx Helvetica-Narrow-BoldOblique
43: Proportional KB Bookman-Demi
44: Proportional KI Bookman-LightItalic
45: Proportional KR Bookman-Light
46: Proportional KX Bookman-DemiItalic
47: Proportional NB NewCenturySchlbk-Bold
48: Proportional NI NewCenturySchlbk-Italic
49: Proportional NR NewCenturySchlbk-Roman
50: Proportional NX NewCenturySchlbk-BoldItalic
51: Proportional PA Palatino-Roman
52: Proportional PB Palatino-Bold
53: Proportional PI Palatino-Italic
54: Proportional PX Palatino-BoldItalic
55: Proportional ZI ZapfChancery-MediumItalic
56: FixedWidth C Courier
57: FixedWidth CB Courier-Bold
58: FixedWidth CI Courier-Oblique
59: FixedWidth CO Courier
60: FixedWidth CW Courier
61: FixedWidth CX Courier-BoldOblique
62: Dingbats ZD ZapfDingbats
63: Greek GR Symbol
64: Symbol S Symbol
65: Special S1 Times-Roman
66: Description DESC ---
67: //End of BuiltinTables
68: }
69:
70: #
71: # AllTables prints the complete list of builtin font names.
72: #
73:
74: AllTables() {
75: BuiltinTables | awk '{print $2}'
76: }
77:
78: #
79: # Charset functions generate keyword/value pairs (as PostScript objects)
80: # that describe the character set available in a font. The keyword is a
81: # PostScript string that represents troff's name for the character. The
82: # value is usually the literal name (i.e. begins with a /) assigned to
83: # the character in the PostScript font. The value can also be an integer
84: # or a PostScript string. An integer value is used as an index in the
85: # current font's Encoding array. A string value is returned to the host
86: # unchanged when the entry for the character is constructed. Entries that
87: # have (") as their value are synonyms for the preceeding character.
88: #
89: # The 18 characters missing from ROM resident fonts on older printers are
90: # flagged with the PostScript comment "% missing".
91: #
92:
93: StandardCharset() {
94: cat <<-'//End of StandardCharset'
95: (!) /exclam
96: (") /quotedbl
97: (#) /numbersign
98: ($) /dollar
99: (%) /percent
100: (&) /ampersand
101: (') /quoteright
102: (\() /parenleft
103: (\)) /parenright
104: (*) /asterisk
105: (+) /plus
106: (,) /comma
107: (-) /minus % also hyphen in devpost
108: (.) /period
109: (/) /slash
110: (0) /zero
111: (1) /one
112: (2) /two
113: (3) /three
114: (4) /four
115: (5) /five
116: (6) /six
117: (7) /seven
118: (8) /eight
119: (9) /nine
120: (:) /colon
121: (;) /semicolon
122: (<) /less
123: (=) /equal
124: (>) /greater
125: (?) /question
126: (@) /at
127: (A) /A
128: (B) /B
129: (C) /C
130: (D) /D
131: (E) /E
132: (F) /F
133: (G) /G
134: (H) /H
135: (I) /I
136: (J) /J
137: (K) /K
138: (L) /L
139: (M) /M
140: (N) /N
141: (O) /O
142: (P) /P
143: (Q) /Q
144: (R) /R
145: (S) /S
146: (T) /T
147: (U) /U
148: (V) /V
149: (W) /W
150: (X) /X
151: (Y) /Y
152: (Z) /Z
153: ([) /bracketleft
154: (\\) /backslash
155: (]) /bracketright
156: (^) /asciicircum
157: (_) /underscore
158: (`) /quoteleft
159: (a) /a
160: (b) /b
161: (c) /c
162: (d) /d
163: (e) /e
164: (f) /f
165: (g) /g
166: (h) /h
167: (i) /i
168: (j) /j
169: (k) /k
170: (l) /l
171: (m) /m
172: (n) /n
173: (o) /o
174: (p) /p
175: (q) /q
176: (r) /r
177: (s) /s
178: (t) /t
179: (u) /u
180: (v) /v
181: (w) /w
182: (x) /x
183: (y) /y
184: (z) /z
185: ({) /braceleft
186: (|) /bar
187: (}) /braceright
188: (~) /asciitilde
189: (\\`) /grave % devpost character
190: (ga) (") % synonym
191: (!!) /exclamdown
192: (c|) /cent
193: (ct) (") % devpost synonym
194: (L-) /sterling
195: (ps) (") % devpost synonym
196: (xo) /currency
197: (cr) (") % devpost synonym
198: (Y-) /yen
199: (yn) (") % devpost synonym
200: (||) /brokenbar % missing
201: (so) /section
202: (sc) (") % devpost synonym
203: ("") /dieresis
204: (co) /copyright
205: (a_) /ordfeminine
206: (<<) /guillemotleft
207: (-,) /logicalnot
208: (hy) /hyphen
209: (--) (") % synonym
210: (ro) /registered
211: (rg) (") % devpost synonym
212: (-^) /macron
213: (0^) /degree % missing
214: (+-) /plusminus % missing
215: (2^) /twosuperior % missing
216: (3^) /threesuperior % missing
217: (\\') /acute
218: (aa) (") % devpost synonym
219: (/u) /mu % missing
220: (P!) /paragraph
221: (pg) (") % devpost synonym
222: (.^) /periodcentered
223: (,,) /cedilla
224: (1^) /onesuperior % missing
225: (o_) /ordmasculine
226: (>>) /guillemotright
227: (14) /onequarter % missing
228: (12) /onehalf % missing
229: (34) /threequarters % missing
230: (??) /questiondown
231: (A`) /Agrave
232: (A') /Aacute
233: (A^) /Acircumflex
234: (A~) /Atilde
235: (A") /Adieresis
236: (A*) /Aring
237: (AE) /AE
238: (C,) /Ccedilla
239: (E`) /Egrave
240: (E') /Eacute
241: (E^) /Ecircumflex
242: (E") /Edieresis
243: (I`) /Igrave
244: (I') /Iacute
245: (I^) /Icircumflex
246: (I") /Idieresis
247: (D-) /Eth % missing
248: (N~) /Ntilde
249: (O`) /Ograve
250: (O') /Oacute
251: (O^) /Ocircumflex
252: (O~) /Otilde
253: (O") /Odieresis
254: (xx) /multiply % missing
255: (O/) /Oslash
256: (U`) /Ugrave
257: (U') /Uacute
258: (U^) /Ucircumflex
259: (U") /Udieresis
260: (Y') /Yacute % missing
261: (TH) /Thorn % missing
262: (ss) /germandbls
263: (a`) /agrave
264: (a') /aacute
265: (a^) /acircumflex
266: (a~) /atilde
267: (a") /adieresis
268: (a*) /aring
269: (ae) /ae
270: (c,) /ccedilla
271: (e`) /egrave
272: (e') /eacute
273: (e^) /ecircumflex
274: (e") /edieresis
275: (i`) /igrave
276: (i') /iacute
277: (i^) /icircumflex
278: (i") /idieresis
279: (d-) /eth % missing
280: (n~) /ntilde
281: (o`) /ograve
282: (o') /oacute
283: (o^) /ocircumflex
284: (o~) /otilde
285: (o") /odieresis
286: (-:) /divide % missing
287: (o/) /oslash
288: (u`) /ugrave
289: (u') /uacute
290: (u^) /ucircumflex
291: (u") /udieresis
292: (y') /yacute % missing
293: (th) /thorn % missing
294: (y") /ydieresis
295: //End of StandardCharset
296: }
297:
298: SymbolCharset() {
299: cat <<-'//End of SymbolCharset'
300: (---) /exclam
301: (fa) /universal
302: (---) /numbersign
303: (te) /existential
304: (---) /percent
305: (---) /ampersand
306: (st) /suchthat
307: (---) /parenleft
308: (---) /parenright
309: (**) /asteriskmath
310: (pl) /plus
311: (---) /comma
312: (mi) /minus
313: (---) /period
314: (sl) /slash
315: (---) /zero
316: (---) /one
317: (---) /two
318: (---) /three
319: (---) /four
320: (---) /five
321: (---) /six
322: (---) /seven
323: (---) /eight
324: (---) /nine
325: (---) /colon
326: (---) /semicolon
327: (<) /less
328: (eq) /equal
329: (>) /greater
330: (---) /question
331: (cg) /congruent
332: (*A) /Alpha
333: (*B) /Beta
334: (*X) /Chi
335: (*D) /Delta
336: (*E) /Epsilon
337: (*F) /Phi
338: (*G) /Gamma
339: (*Y) /Eta
340: (*I) /Iota
341: (---) /theta1
342: (*K) /Kappa
343: (*L) /Lambda
344: (*M) /Mu
345: (*N) /Nu
346: (*O) /Omicron
347: (*P) /Pi
348: (*H) /Theta
349: (*R) /Rho
350: (*S) /Sigma
351: (*T) /Tau
352: (*U) /Upsilon
353: (ts) /sigma1
354: (*W) /Omega
355: (*C) /Xi
356: (*Q) /Psi
357: (*Z) /Zeta
358: (---) /bracketleft
359: (tf) /therefore
360: (---) /bracketright
361: (pp) /perpendicular
362: (ul) /underscore
363: (_) (") % synonym
364: (rn) /radicalex
365: (*a) /alpha
366: (*b) /beta
367: (*x) /chi
368: (*d) /delta
369: (*e) /epsilon
370: (*f) /phi
371: (*g) /gamma
372: (*y) /eta
373: (*i) /iota
374: (---) /phi1
375: (*k) /kappa
376: (*l) /lambda
377: (*m) /mu
378: (*n) /nu
379: (*o) /omicron
380: (*p) /pi
381: (*h) /theta
382: (*r) /rho
383: (*s) /sigma
384: (*t) /tau
385: (*u) /upsilon
386: (---) /omega1
387: (*w) /omega
388: (*c) /xi
389: (*q) /psi
390: (*z) /zeta
391: (---) /braceleft
392: (or) /bar
393: (---) /braceright
394: (ap) /similar
395: (---) /Upsilon1
396: (fm) /minute
397: (<=) /lessequal
398: (fr) /fraction % devpost character
399: (if) /infinity
400: (fn) /florin % devpost character
401: (---) /club
402: (---) /diamond
403: (---) /heart
404: (---) /spade
405: (ab) /arrowboth
406: (<-) /arrowleft
407: (ua) /arrowup
408: (->) /arrowright
409: (da) /arrowdown
410: (de) /degree
411: (+-) /plusminus
412: (---) /second
413: (>=) /greaterequal
414: (mu) /multiply
415: (pt) /proportional
416: (pd) /partialdiff
417: (bu) /bullet
418: (di) /divide
419: (!=) /notequal
420: (==) /equivalence
421: (~~) /approxequal
422: (el) /ellipsis
423: (av) /arrowvertex
424: (ah) /arrowhorizex
425: (CR) /carriagereturn
426: (af) /aleph
427: (If) /Ifraktur
428: (Rf) /Rfraktur
429: (ws) /weierstrass
430: (Ox) /circlemultiply
431: (O+) /circleplus
432: (es) /emptyset
433: (ca) /intersection
434: (cu) /union
435: (sp) /propersuperset
436: (ip) /reflexsuperset
437: (!b) /notsubset
438: (sb) /propersubset
439: (ib) /reflexsubset
440: (mo) /element
441: (!m) /notelement
442: (an) /angle
443: (gr) /gradient
444: (rg) /registerserif
445: (co) /copyrightserif
446: (tm) /trademarkserif
447: (---) /product
448: (sr) /radical
449: (c.) /dotmath
450: (no) /logicalnot
451: (l&) /logicaland
452: (l|) /logicalor
453: (---) /arrowdblboth
454: (---) /arrowdblleft
455: (---) /arrowdblup
456: (---) /arrowdblright
457: (---) /arrowdbldown
458: (lz) /lozenge
459: (b<) /angleleft
460: (RG) /registersans
461: (CO) /copyrightsans
462: (TM) /trademarksans
463: (---) /summation
464: (LT) /parenlefttp
465: (br) /parenleftex
466: (LX) (") % synonym
467: (LB) /parenleftbt
468: (lc) /bracketlefttp
469: (lx) /bracketleftex
470: (lf) /bracketleftbt
471: (lt) /bracelefttp
472: (lk) /braceleftmid
473: (lb) /braceleftbt
474: (bv) /braceex
475: (|) (") % synonym
476: (b>) /angleright
477: (is) /integral
478: (---) /integraltp
479: (---) /integralex
480: (---) /integralbt
481: (RT) /parenrighttp
482: (RX) /parenrightex
483: (RB) /parenrightbt
484: (rc) /bracketrighttp
485: (rx) /bracketrightex
486: (rf) /bracketrightbt
487: (rt) /bracerighttp
488: (rk) /bracerightmid
489: (rb) /bracerightbt
490: (~=) (55 0 1) % charlib
491: //End of SymbolCharset
492: }
493:
494: SpecialCharset() {
495: cat <<-'//End of SpecialCharset'
496: (ru) /underscore
497: ('') /quotedblright % devpost character
498: (``) /quotedblleft % devpost character
499: (dg) /dagger % devpost character
500: (dd) /daggerdbl % devpost character
501: (en) /endash % devpost character
502: (\\-) (") % synonym
503: (em) /emdash
504: % (ff) (60 2 1) % charlib
505: % (Fi) (84 2 1) % charlib
506: % (Fl) (84 2 1) % charlib
507: (14) (75 2 1) % charlib
508: (12) (75 2 1) % charlib
509: (34) (75 2 1) % charlib
510: (bx) (50 2 1) % charlib
511: (ob) (38 2 1) % charlib
512: (ci) (75 0 1) % charlib
513: (sq) (50 2 1) % charlib
514: (Sl) (50 2 1) % charlib
515: (L1) (110 1 2) % charlib
516: (LA) (110 1 2) % charlib
517: (LV) (110 3 1) % charlib
518: (LH) (210 1 1) % charlib
519: (lh) (100 0 1) % charlib
520: (rh) (100 0 1) % charlib
521: (lH) (100 0 1) % charlib
522: (rH) (100 0 1) % charlib
523: (PC) (220 2 1) % charlib
524: (DG) (185 2 1) % charlib
525: //End of SpecialCharset
526: }
527:
528: #
529: # Latin1 ensures a font uses the ISOLatin1Encoding vector, although only
530: # text fonts should be re-encoded. Downloading the Encoding vector doesn't
531: # often make sense. No ISOLatin1Encoding array likely means ROM based fonts
532: # on your printer are incomplete. Type 1 fonts with a full Latin1 character
533: # set appeared sometime after Version 50.0.
534: #
535:
536: Latin1() {
537: if [ "$DOWNLOADVECTOR" = TRUE ]; then
538: cat <<-'//End of ISOLatin1Encoding'
539: /ISOLatin1Encoding [
540: /.notdef
541: /.notdef
542: /.notdef
543: /.notdef
544: /.notdef
545: /.notdef
546: /.notdef
547: /.notdef
548: /.notdef
549: /.notdef
550: /.notdef
551: /.notdef
552: /.notdef
553: /.notdef
554: /.notdef
555: /.notdef
556: /.notdef
557: /.notdef
558: /.notdef
559: /.notdef
560: /.notdef
561: /.notdef
562: /.notdef
563: /.notdef
564: /.notdef
565: /.notdef
566: /.notdef
567: /.notdef
568: /.notdef
569: /.notdef
570: /.notdef
571: /.notdef
572: /space
573: /exclam
574: /quotedbl
575: /numbersign
576: /dollar
577: /percent
578: /ampersand
579: /quoteright
580: /parenleft
581: /parenright
582: /asterisk
583: /plus
584: /comma
585: /minus
586: /period
587: /slash
588: /zero
589: /one
590: /two
591: /three
592: /four
593: /five
594: /six
595: /seven
596: /eight
597: /nine
598: /colon
599: /semicolon
600: /less
601: /equal
602: /greater
603: /question
604: /at
605: /A
606: /B
607: /C
608: /D
609: /E
610: /F
611: /G
612: /H
613: /I
614: /J
615: /K
616: /L
617: /M
618: /N
619: /O
620: /P
621: /Q
622: /R
623: /S
624: /T
625: /U
626: /V
627: /W
628: /X
629: /Y
630: /Z
631: /bracketleft
632: /backslash
633: /bracketright
634: /asciicircum
635: /underscore
636: /quoteleft
637: /a
638: /b
639: /c
640: /d
641: /e
642: /f
643: /g
644: /h
645: /i
646: /j
647: /k
648: /l
649: /m
650: /n
651: /o
652: /p
653: /q
654: /r
655: /s
656: /t
657: /u
658: /v
659: /w
660: /x
661: /y
662: /z
663: /braceleft
664: /bar
665: /braceright
666: /asciitilde
667: /.notdef
668: /.notdef
669: /.notdef
670: /.notdef
671: /.notdef
672: /.notdef
673: /.notdef
674: /.notdef
675: /.notdef
676: /.notdef
677: /.notdef
678: /.notdef
679: /.notdef
680: /.notdef
681: /.notdef
682: /.notdef
683: /.notdef
684: /dotlessi
685: /grave
686: /acute
687: /circumflex
688: /tilde
689: /macron
690: /breve
691: /dotaccent
692: /dieresis
693: /.notdef
694: /ring
695: /cedilla
696: /.notdef
697: /hungarumlaut
698: /ogonek
699: /caron
700: /space
701: /exclamdown
702: /cent
703: /sterling
704: /currency
705: /yen
706: /brokenbar
707: /section
708: /dieresis
709: /copyright
710: /ordfeminine
711: /guillemotleft
712: /logicalnot
713: /hyphen
714: /registered
715: /macron
716: /degree
717: /plusminus
718: /twosuperior
719: /threesuperior
720: /acute
721: /mu
722: /paragraph
723: /periodcentered
724: /cedilla
725: /onesuperior
726: /ordmasculine
727: /guillemotright
728: /onequarter
729: /onehalf
730: /threequarters
731: /questiondown
732: /Agrave
733: /Aacute
734: /Acircumflex
735: /Atilde
736: /Adieresis
737: /Aring
738: /AE
739: /Ccedilla
740: /Egrave
741: /Eacute
742: /Ecircumflex
743: /Edieresis
744: /Igrave
745: /Iacute
746: /Icircumflex
747: /Idieresis
748: /Eth
749: /Ntilde
750: /Ograve
751: /Oacute
752: /Ocircumflex
753: /Otilde
754: /Odieresis
755: /multiply
756: /Oslash
757: /Ugrave
758: /Uacute
759: /Ucircumflex
760: /Udieresis
761: /Yacute
762: /Thorn
763: /germandbls
764: /agrave
765: /aacute
766: /acircumflex
767: /atilde
768: /adieresis
769: /aring
770: /ae
771: /ccedilla
772: /egrave
773: /eacute
774: /ecircumflex
775: /edieresis
776: /igrave
777: /iacute
778: /icircumflex
779: /idieresis
780: /eth
781: /ntilde
782: /ograve
783: /oacute
784: /ocircumflex
785: /otilde
786: /odieresis
787: /divide
788: /oslash
789: /ugrave
790: /uacute
791: /ucircumflex
792: /udieresis
793: /yacute
794: /thorn
795: /ydieresis
796: ] def
797: //End of ISOLatin1Encoding
798: fi
799:
800: echo "ISOLatin1Encoding /$1 ReEncode"
801: }
802:
803: #
804: # Generating functions output PostScript programs that build font width
805: # tables or a typesetter description file. Send the program to a printer
806: # and the complete table will come back on the serial port. All write on
807: # stdout and assume the prologue and other required PostScript files are
808: # all available.
809: #
810:
811: Proportional() {
812: echo "/unitwidth $UNITWIDTH def"
813: echo "/resolution $RESOLUTION def"
814: echo "/octalescapes $OCTALESCAPES def"
815: echo "/charset ["
816: # Get <>_ and | from S. Use accents for ascii ^ and ~.
817: StandardCharset | awk '
818: $1 == "(<)" && $2 == "/less" {$1 = "(---)"}
819: $1 == "(>)" && $2 == "/greater" {$1 = "(---)"}
820: $1 == "(_)" && $2 == "/underscore" {$1 = "(---)"}
821: $1 == "(|)" && $2 == "/bar" {$1 = "(---)"}
822: $1 == "(^)" && $2 == "/asciicircum" {
823: printf "(^)\t/circumflex\n"
824: $1 = "(---)"
825: }
826: $1 == "(~)" && $2 == "/asciitilde" {
827: printf "(~)\t/tilde\n"
828: $1 = "(---)"
829: }
830: {printf "%s\t%s\n", $1, $2}
831: '
832: echo "] def"
833:
834: Latin1 $2
835: echo "/$2 SelectFont"
836: echo "(opO) SetAscender"
837:
838: echo "(name $1\\\\n) Print"
839: echo "(fontname $2\\\\n) Print"
840: echo "/$1 NamedInPrologue"
841: echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
842: echo "(charset\\\\n) Print"
843: echo "BuildFontCharset"
844: }
845:
846: FixedWidth() {
847: echo "/unitwidth $UNITWIDTH def"
848: echo "/resolution $RESOLUTION def"
849: echo "/octalescapes $OCTALESCAPES def"
850: echo "/charset ["
851: StandardCharset
852: echo "] def"
853:
854: Latin1 $2
855: echo "/$2 SelectFont"
856: echo "(opO) SetAscender"
857:
858: echo "(name $1\\\\n) Print"
859: echo "(fontname $2\\\\n) Print"
860: echo "/$1 NamedInPrologue"
861: echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
862: echo "(charset\\\\n) Print"
863: echo "BuildFontCharset"
864: }
865:
866: Dingbats() {
867: echo "/unitwidth $UNITWIDTH def"
868: echo "/resolution $RESOLUTION def"
869: echo "/octalescapes $OCTALESCAPES def"
870: echo "/charset ["
871: StandardCharset | awk '$1 != "(---)" && $2 ~ /^\/[a-zA-Z]/ {
872: printf "%s\tISOLatin1Encoding %s GetCode\n", $1, $2
873: }'
874: echo "] def"
875:
876: echo "/$2 SelectFont"
877: echo "( ) SetAscender"
878:
879: echo "(name $1\\\\n) Print"
880: echo "(fontname $2\\\\n) Print"
881: echo "/$1 NamedInPrologue"
882: echo "(charset\\\\n) Print"
883: echo "BuildFontCharset"
884: }
885:
886: Greek() {
887: echo "/unitwidth $UNITWIDTH def"
888: echo "/resolution $RESOLUTION def"
889: echo "/charset ["
890: SymbolCharset | awk '$1 ~ /\(\*[a-zA-Z]\)/'
891: echo "] def"
892:
893: echo "/$2 SelectFont"
894: echo "(orO) SetAscender"
895:
896: echo "(name $1\\\\n) Print"
897: echo "(fontname $2\\\\n) Print"
898: echo "/$1 NamedInPrologue"
899: echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"
900: echo "(charset\\\\n) Print"
901: echo "BuildFontCharset"
902: }
903:
904: Symbol() {
905: echo "/unitwidth $UNITWIDTH def"
906: echo "/resolution $RESOLUTION def"
907: echo "/charset ["
908: SymbolCharset
909: echo "] def"
910:
911: echo "ChangeMetrics"
912: echo "/S SelectFont"
913: echo "(orO) SetAscender"
914:
915: echo "(name $1\\\\n) Print"
916: echo "(fontname $2\\\\n) Print"
917: echo "/$1 NamedInPrologue"
918: echo "(special\\\\n) Print"
919: echo "(charset\\\\n) Print"
920: echo "BuildFontCharset"
921: }
922:
923: Special() {
924: echo "/unitwidth $UNITWIDTH def"
925: echo "/resolution $RESOLUTION def"
926: echo "/charset ["
927: SpecialCharset
928: echo "] def"
929:
930: echo "ChangeMetrics"
931: echo "/S1 SelectFont"
932:
933: echo "(# Times-Roman special font\\\\n) Print"
934: echo "(name $1\\\\n) Print"
935: echo "(fontname $2\\\\n) Print"
936: echo "/$1 NamedInPrologue"
937: echo "(special\\\\n) Print"
938: echo "(charset\\\\n) Print"
939: echo "BuildFontCharset"
940: }
941:
942: #
943: # The DESC file doesn't have to be built on a printer. It's only here for
944: # consistency.
945: #
946:
947: Description() {
948: echo "/charset [" # awk - so the stack doesn't overflow
949: StandardCharset | awk '{print $1}'
950: SymbolCharset | awk '{print $1}'
951: SpecialCharset | awk '{print $1}'
952: echo "] def"
953:
954: cat <<-//DESC
955: (#Device Description - Latin1 character set
956:
957: PDL PostScript
958: Encoding Latin1
959:
960: fonts 10 R I B BI CW H HI HB S1 S
961: sizes 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
962: 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 42 44 46
963: 48 50 52 54 56 58 60 64 68 72 78 84 90 96 100 105 110 115
964: 120 125 130 135 140 145 150 155 160 0
965: res $RESOLUTION
966: hor 1
967: vert 1
968: unitwidth $UNITWIDTH
969:
970: ) Print
971: //DESC
972: echo "(charset\\\\n) Print"
973: echo "BuildDescCharset"
974: echo "(\\\\n) Print"
975: }
976:
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.