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