Blob
1 #2 # Shell library - for building devutf tables.3 #5 RESOLUTION=7206 UNITWIDTH=108 OCTALESCAPES=${OCTALESCAPES:-160} # <= code means add \0ddd names9 DOWNLOADVECTOR=FALSE # TRUE can mean incomplete tables11 #12 # BuiltinTables returns command lines that generate PostScript programs13 # for building a typesetter description file and font width tables for14 # a relatively standard collection of fonts. Use awk to select a command15 # line or modify an existing command to build a width table for a new16 # font.17 #19 BuiltinTables() {20 cat <<-'//End of BuiltinTables'21 Proportional R Times-Roman22 Proportional I Times-Italic23 Proportional B Times-Bold24 Proportional BI Times-BoldItalic25 Proportional AB AvantGarde-Demi26 Proportional AI AvantGarde-BookOblique27 Proportional AR AvantGarde-Book28 Proportional AX AvantGarde-DemiOblique29 Proportional H Helvetica30 Proportional HB Helvetica-Bold31 Proportional HI Helvetica-Oblique32 Proportional HX Helvetica-BoldOblique33 Proportional Hb Helvetica-Narrow-Bold34 Proportional Hi Helvetica-Narrow-Oblique35 Proportional Hr Helvetica-Narrow36 Proportional Hx Helvetica-Narrow-BoldOblique37 Proportional KB Bookman-Demi38 Proportional KI Bookman-LightItalic39 Proportional KR Bookman-Light40 Proportional KX Bookman-DemiItalic41 Proportional NB NewCenturySchlbk-Bold42 Proportional NI NewCenturySchlbk-Italic43 Proportional NR NewCenturySchlbk-Roman44 Proportional NX NewCenturySchlbk-BoldItalic45 Proportional PA Palatino-Roman46 Proportional PB Palatino-Bold47 Proportional PI Palatino-Italic48 Proportional PX Palatino-BoldItalic49 Proportional ZI ZapfChancery-MediumItalic50 FixedWidth C Courier51 FixedWidth CB Courier-Bold52 FixedWidth CI Courier-Oblique53 FixedWidth CO Courier54 FixedWidth CW Courier55 FixedWidth CX Courier-BoldOblique56 Dingbats ZD ZapfDingbats57 Greek GR Symbol58 Symbol S Symbol59 Special S1 Times-Roman60 Description DESC ---61 //End of BuiltinTables62 }64 #65 # AllTables prints the complete list of builtin font names.66 #68 AllTables() {69 BuiltinTables | awk '{print $2}'70 }72 #73 # Charset functions generate keyword/value pairs (as PostScript objects)74 # that describe the character set available in a font. The keyword is a75 # PostScript string that represents troff's name for the character. The76 # value is usually the literal name (i.e. begins with a /) assigned to77 # the character in the PostScript font. The value can also be an integer78 # or a PostScript string. An integer value is used as an index in the79 # current font's Encoding array. A string value is returned to the host80 # unchanged when the entry for the character is constructed. Entries that81 # have (") as their value are synonyms for the preceeding character.82 #83 # The 18 characters missing from ROM resident fonts on older printers are84 # flagged with the PostScript comment "% missing".85 #87 StandardCharset() {88 cat <<-'//End of StandardCharset'89 (!) /exclam90 (") /quotedbl91 (dq) (") % synonym92 (#) /numbersign93 ($) /dollar94 (%) /percent95 (&) /ampersand96 (') /quoteright97 (\() /parenleft98 (\)) /parenright99 (*) /asterisk100 (+) /plus101 (,) /comma102 (-) /hyphen % changed from minus by request103 (.) /period104 (/) /slash105 (0) /zero106 (1) /one107 (2) /two108 (3) /three109 (4) /four110 (5) /five111 (6) /six112 (7) /seven113 (8) /eight114 (9) /nine115 (:) /colon116 (;) /semicolon117 (<) /less118 (=) /equal119 (>) /greater120 (?) /question121 (@) /at122 (A) /A123 (B) /B124 (C) /C125 (D) /D126 (E) /E127 (F) /F128 (G) /G129 (H) /H130 (I) /I131 (J) /J132 (K) /K133 (L) /L134 (M) /M135 (N) /N136 (O) /O137 (P) /P138 (Q) /Q139 (R) /R140 (S) /S141 (T) /T142 (U) /U143 (V) /V144 (W) /W145 (X) /X146 (Y) /Y147 (Z) /Z148 ([) /bracketleft149 (\\) /backslash150 (bs) (") % synonym151 (]) /bracketright152 (^) /asciicircum153 (_) /underscore154 (`) /quoteleft155 (a) /a156 (b) /b157 (c) /c158 (d) /d159 (e) /e160 (f) /f161 (g) /g162 (h) /h163 (i) /i164 (j) /j165 (k) /k166 (l) /l167 (m) /m168 (n) /n169 (o) /o170 (p) /p171 (q) /q172 (r) /r173 (s) /s174 (t) /t175 (u) /u176 (v) /v177 (w) /w178 (x) /x179 (y) /y180 (z) /z181 ({) /braceleft182 (|) /bar183 (}) /braceright184 (~) /asciitilde185 (\\`) /grave % devpost character186 (ga) (") % synonym187 (!!) /exclamdown188 (c|) /cent189 (ct) (") % devpost synonym190 (L-) /sterling191 (ps) (") % devpost synonym192 (xo) /currency193 (cr) (") % devpost synonym194 (Y-) /yen195 (yn) (") % devpost synonym196 (||) /brokenbar % missing197 (so) /section198 (sc) (") % devpost synonym199 ("") /dieresis200 (:a) (") % devpost synonym201 (co) /copyright202 (a_) /ordfeminine203 (<<) /guillemotleft204 (-,) /logicalnot205 (hy) /hyphen206 (--) /minus207 (ro) /registered208 (rg) (") % devpost synonym209 (-^) /macron210 (-a) (") % devpost synonym211 (0^) /degree % missing212 (+-) /plusminus % missing213 (2^) /twosuperior % missing214 (3^) /threesuperior % missing215 (\\') /acute216 (aa) (") % devpost synonym217 (/u) /mu % missing218 (P!) /paragraph219 (pg) (") % devpost synonym220 (.^) /periodcentered221 (,,) /cedilla222 (,a) (") % devpost synonym223 (1^) /onesuperior % missing224 (o_) /ordmasculine225 (>>) /guillemotright226 (14) /onequarter % missing227 (12) /onehalf % missing228 (34) /threequarters % missing229 (??) /questiondown230 (A`) /Agrave231 (A') /Aacute232 (A^) /Acircumflex233 (A~) /Atilde234 (A") /Adieresis235 (A*) /Aring236 (AE) /AE237 (C,) /Ccedilla238 (E`) /Egrave239 (E') /Eacute240 (E^) /Ecircumflex241 (E") /Edieresis242 (I`) /Igrave243 (I') /Iacute244 (I^) /Icircumflex245 (I") /Idieresis246 (D-) /Eth % missing247 (N~) /Ntilde248 (O`) /Ograve249 (O') /Oacute250 (O^) /Ocircumflex251 (O~) /Otilde252 (O") /Odieresis253 (xx) /multiply % missing254 (O/) /Oslash255 (U`) /Ugrave256 (U') /Uacute257 (U^) /Ucircumflex258 (U") /Udieresis259 (Y') /Yacute % missing260 (TH) /Thorn % missing261 (ss) /germandbls262 (a`) /agrave263 (a') /aacute264 (a^) /acircumflex265 (a~) /atilde266 (a") /adieresis267 (a*) /aring268 (ae) /ae269 (c,) /ccedilla270 (e`) /egrave271 (e') /eacute272 (e^) /ecircumflex273 (e") /edieresis274 (i`) /igrave275 (i') /iacute276 (i^) /icircumflex277 (i") /idieresis278 (d-) /eth % missing279 (n~) /ntilde280 (o`) /ograve281 (o') /oacute282 (o^) /ocircumflex283 (o~) /otilde284 (o") /odieresis285 (-:) /divide % missing286 (o/) /oslash287 (u`) /ugrave288 (u') /uacute289 (u^) /ucircumflex290 (u") /udieresis291 (y') /yacute % missing292 (th) /thorn % missing293 (y") /ydieresis294 (^a) /circumflex % devpost accent295 (~a) /tilde % devpost accent296 (Ua) /breve % devpost accent297 (.a) /dotaccent % devpost accent298 (oa) /ring % devpost accent299 ("a) /hungarumlaut % devpost accent300 (Ca) /ogonek % devpost accent301 (va) /caron % devpost accent302 //End of StandardCharset303 }305 #306 # DingbatsCharset guarantees changes in StandardCharset don't show up in ZD.307 #309 DingbatsCharset() {310 cat <<-'//End of DingbatsCharset'311 (!) /exclam312 (") /quotedbl313 (#) /numbersign314 ($) /dollar315 (%) /percent316 (&) /ampersand317 (') /quoteright318 (\() /parenleft319 (\)) /parenright320 (*) /asterisk321 (+) /plus322 (,) /comma323 (-) /minus % also hyphen in devpost324 (.) /period325 (/) /slash326 (0) /zero327 (1) /one328 (2) /two329 (3) /three330 (4) /four331 (5) /five332 (6) /six333 (7) /seven334 (8) /eight335 (9) /nine336 (:) /colon337 (;) /semicolon338 (<) /less339 (=) /equal340 (>) /greater341 (?) /question342 (@) /at343 (A) /A344 (B) /B345 (C) /C346 (D) /D347 (E) /E348 (F) /F349 (G) /G350 (H) /H351 (I) /I352 (J) /J353 (K) /K354 (L) /L355 (M) /M356 (N) /N357 (O) /O358 (P) /P359 (Q) /Q360 (R) /R361 (S) /S362 (T) /T363 (U) /U364 (V) /V365 (W) /W366 (X) /X367 (Y) /Y368 (Z) /Z369 ([) /bracketleft370 (\\) /backslash371 (]) /bracketright372 (^) /asciicircum373 (_) /underscore374 (`) /quoteleft375 (a) /a376 (b) /b377 (c) /c378 (d) /d379 (e) /e380 (f) /f381 (g) /g382 (h) /h383 (i) /i384 (j) /j385 (k) /k386 (l) /l387 (m) /m388 (n) /n389 (o) /o390 (p) /p391 (q) /q392 (r) /r393 (s) /s394 (t) /t395 (u) /u396 (v) /v397 (w) /w398 (x) /x399 (y) /y400 (z) /z401 ({) /braceleft402 (|) /bar403 (}) /braceright404 (~) /asciitilde405 (\\`) /grave % devpost character406 (!!) /exclamdown407 (c|) /cent408 (L-) /sterling409 (xo) /currency410 (Y-) /yen411 (||) /brokenbar % missing412 (so) /section413 ("") /dieresis414 (co) /copyright415 (a_) /ordfeminine416 (<<) /guillemotleft417 (-,) /logicalnot418 (hy) /hyphen419 (ro) /registered420 (-^) /macron421 (0^) /degree % missing422 (+-) /plusminus % missing423 (2^) /twosuperior % missing424 (3^) /threesuperior % missing425 (\\') /acute426 (/u) /mu % missing427 (P!) /paragraph428 (.^) /periodcentered429 (,,) /cedilla430 (1^) /onesuperior % missing431 (o_) /ordmasculine432 (>>) /guillemotright433 (14) /onequarter % missing434 (12) /onehalf % missing435 (34) /threequarters % missing436 (??) /questiondown437 (A`) /Agrave438 (A') /Aacute439 (A^) /Acircumflex440 (A~) /Atilde441 (A") /Adieresis442 (A*) /Aring443 (AE) /AE444 (C,) /Ccedilla445 (E`) /Egrave446 (E') /Eacute447 (E^) /Ecircumflex448 (E") /Edieresis449 (I`) /Igrave450 (I') /Iacute451 (I^) /Icircumflex452 (I") /Idieresis453 (D-) /Eth % missing454 (N~) /Ntilde455 (O`) /Ograve456 (O') /Oacute457 (O^) /Ocircumflex458 (O~) /Otilde459 (O") /Odieresis460 (xx) /multiply % missing461 (O/) /Oslash462 (U`) /Ugrave463 (U') /Uacute464 (U^) /Ucircumflex465 (U") /Udieresis466 (Y') /Yacute % missing467 (TH) /Thorn % missing468 (ss) /germandbls469 (a`) /agrave470 (a') /aacute471 (a^) /acircumflex472 (a~) /atilde473 (a") /adieresis474 (a*) /aring475 (ae) /ae476 (c,) /ccedilla477 (e`) /egrave478 (e') /eacute479 (e^) /ecircumflex480 (e") /edieresis481 (i`) /igrave482 (i') /iacute483 (i^) /icircumflex484 (i") /idieresis485 (d-) /eth % missing486 (n~) /ntilde487 (o`) /ograve488 (o') /oacute489 (o^) /ocircumflex490 (o~) /otilde491 (o") /odieresis492 (-:) /divide % missing493 (o/) /oslash494 (u`) /ugrave495 (u') /uacute496 (u^) /ucircumflex497 (u") /udieresis498 (y') /yacute % missing499 (th) /thorn % missing500 (y") /ydieresis501 //End of DingbatsCharset502 }504 SymbolCharset() {505 cat <<-'//End of SymbolCharset'506 (---) /exclam507 (fa) /universal508 (---) /numbersign509 (te) /existential510 (---) /percent511 (---) /ampersand512 (st) /suchthat513 (---) /parenleft514 (---) /parenright515 (**) /asteriskmath516 (pl) /plus517 (---) /comma518 (mi) /minus519 (---) /period520 (sl) /slash521 (---) /zero522 (---) /one523 (---) /two524 (---) /three525 (---) /four526 (---) /five527 (---) /six528 (---) /seven529 (---) /eight530 (---) /nine531 (---) /colon532 (---) /semicolon533 (<) /less534 (eq) /equal535 (>) /greater536 (---) /question537 (cg) /congruent538 (*A) /Alpha539 (\244x) (")540 (*B) /Beta541 (\244y) (")542 (*X) /Chi543 (\244\257) (")544 (*D) /Delta545 (\244{) (")546 (*E) /Epsilon547 (\244|) (")548 (*F) /Phi549 (\244\256) (")550 (*G) /Gamma551 (\244z) (")552 (*Y) /Eta553 (\244~) (")554 (*I) /Iota555 (\244\241) (")556 (---) /theta1557 (\244\331) (")558 (*K) /Kappa559 (\244\242) (")560 (*L) /Lambda561 (\244\243) (")562 (*M) /Mu563 (\244\244) (")564 (*N) /Nu565 (\244\245) (")566 (*O) /Omicron567 (\244\247) (")568 (*P) /Pi569 (\244\250) (")570 (*H) /Theta571 (\244\240) (")572 (*R) /Rho573 (\244\251) (")574 (*S) /Sigma575 (\244\253) (")576 (*T) /Tau577 (\244\254) (")578 (*U) /Upsilon579 (\244\255) (")580 (ts) /sigma1581 (\244\312) (")582 (*W) /Omega583 (\244\261) (")584 (*C) /Xi585 (\244\246) (")586 (*Q) /Psi587 (\244\260) (")588 (*Z) /Zeta589 (\244}) (")590 (---) /bracketleft591 (tf) /therefore592 (---) /bracketright593 (pp) /perpendicular594 (ul) /underscore595 (_) (") % synonym596 (rn) /radicalex597 (*a) /alpha598 (\244\271) (")599 (*b) /beta600 (\244\272) (")601 (*x) /chi602 (\244\317) (")603 (*d) /delta604 (\244\274) (")605 (*e) /epsilon606 (\244\275) (")607 (*f) /phi608 (\244\316) (")609 (*g) /gamma610 (\244\273) (")611 (*y) /eta612 (\244\277) (")613 (*i) /iota614 (\244\301) (")615 (---) /phi1616 (\244\335) (")617 (*k) /kappa618 (\244\302) (")619 (*l) /lambda620 (\244\303) (")621 (*m) /mu622 (\244\304) (")623 (*n) /nu624 (\244\305) (")625 (*o) /omicron626 (\244\307) (")627 (*p) /pi628 (\244\310) (")629 (*h) /theta630 (\244\300) (")631 (*r) /rho632 (\244\311) (")633 (*s) /sigma634 (\244\313) (")635 (*t) /tau636 (\244\314) (")637 (*u) /upsilon638 (\244\315) (")639 (---) /omega1640 (\244\336) (")641 (*w) /omega642 (\244\321) (")643 (*c) /xi644 (\244\306) (")645 (*q) /psi646 (\244\320) (")647 (*z) /zeta648 (\244\276) (")649 (---) /braceleft650 (or) /bar651 (---) /braceright652 (ap) /similar653 (---) /Upsilon1654 (fm) /minute655 (<=) /lessequal656 (fr) /fraction % devpost character657 (if) /infinity658 (fn) /florin % devpost character659 (---) /club660 (---) /diamond661 (---) /heart662 (---) /spade663 (ab) /arrowboth664 (<-) /arrowleft665 (ua) /arrowup666 (->) /arrowright667 (da) /arrowdown668 (de) /degree669 (+-) /plusminus670 (---) /second671 (>=) /greaterequal672 (mu) /multiply673 (pt) /proportional674 (pd) /partialdiff675 (bu) /bullet676 (di) /divide677 (!=) /notequal678 (==) /equivalence679 (~~) /approxequal680 (el) /ellipsis681 (av) /arrowvertex682 (ah) /arrowhorizex683 (CR) /carriagereturn684 (af) /aleph685 (If) /Ifraktur686 (Rf) /Rfraktur687 (ws) /weierstrass688 (Ox) /circlemultiply689 (O+) /circleplus690 (es) /emptyset691 (ca) /intersection692 (cu) /union693 (sp) /propersuperset694 (ip) /reflexsuperset695 (!b) /notsubset696 (sb) /propersubset697 (ib) /reflexsubset698 (mo) /element699 (!m) /notelement700 (an) /angle701 (gr) /gradient702 (rg) /registerserif703 (co) /copyrightserif704 (tm) /trademarkserif705 (---) /product706 (sr) /radical707 (c.) /dotmath708 (no) /logicalnot709 (l&) /logicaland710 (l|) /logicalor711 (---) /arrowdblboth712 (---) /arrowdblleft713 (---) /arrowdblup714 (---) /arrowdblright715 (---) /arrowdbldown716 (lz) /lozenge717 (b<) /angleleft718 (RG) /registersans719 (CO) /copyrightsans720 (TM) /trademarksans721 (---) /summation722 (LT) /parenlefttp723 (br) /parenleftex724 (LX) (") % synonym725 (LB) /parenleftbt726 (lc) /bracketlefttp727 (lx) /bracketleftex728 (lf) /bracketleftbt729 (lt) /bracelefttp730 (lk) /braceleftmid731 (lb) /braceleftbt732 (bv) /braceex733 (|) (") % synonym734 (b>) /angleright735 (is) /integral736 (---) /integraltp737 (---) /integralex738 (---) /integralbt739 (RT) /parenrighttp740 (RX) /parenrightex741 (RB) /parenrightbt742 (rc) /bracketrighttp743 (rx) /bracketrightex744 (rf) /bracketrightbt745 (rt) /bracerighttp746 (rk) /bracerightmid747 (rb) /bracerightbt748 (~=) (55 0 1) % charlib749 //End of SymbolCharset750 }752 SpecialCharset() {753 cat <<-'//End of SpecialCharset'754 (ru) /underscore755 ('') /quotedblright % devpost character756 (``) /quotedblleft % devpost character757 (dg) /dagger % devpost character758 (dd) /daggerdbl % devpost character759 (en) /endash % devpost character760 (\\-) (") % synonym761 (em) /emdash762 % (ff) (60 2 1) % charlib763 % (Fi) (84 2 1) % charlib764 % (Fl) (84 2 1) % charlib765 (14) (75 2 1) % charlib766 (12) (75 2 1) % charlib767 (34) (75 2 1) % charlib768 (bx) (50 2 1) % charlib769 (ob) (38 2 1) % charlib770 (ci) (75 0 1) % charlib771 (sq) (50 2 1) % charlib772 (Sl) (50 2 1) % charlib773 (L1) (110 1 1) % charlib774 (LA) (110 1 1) % charlib775 (LV) (110 3 1) % charlib776 (LH) (210 1 1) % charlib777 (lh) (100 0 1) % charlib778 (rh) (100 0 1) % charlib779 (lH) (100 0 1) % charlib780 (rH) (100 0 1) % charlib781 (PC) (220 2 1) % charlib782 (DG) (185 2 1) % charlib783 //End of SpecialCharset784 }786 #787 # Latin1 ensures a font uses the ISOLatin1Encoding vector, although only788 # text fonts should be re-encoded. Downloading the Encoding vector doesn't789 # often make sense. No ISOLatin1Encoding array likely means ROM based fonts790 # on your printer are incomplete. Type 1 fonts with a full Latin1 character791 # set appeared sometime after Version 50.0.792 #794 Latin1() {795 if [ "$DOWNLOADVECTOR" = TRUE ]; then796 cat <<-'//End of ISOLatin1Encoding'797 /ISOLatin1Encoding [798 /.notdef799 /.notdef800 /.notdef801 /.notdef802 /.notdef803 /.notdef804 /.notdef805 /.notdef806 /.notdef807 /.notdef808 /.notdef809 /.notdef810 /.notdef811 /.notdef812 /.notdef813 /.notdef814 /.notdef815 /.notdef816 /.notdef817 /.notdef818 /.notdef819 /.notdef820 /.notdef821 /.notdef822 /.notdef823 /.notdef824 /.notdef825 /.notdef826 /.notdef827 /.notdef828 /.notdef829 /.notdef830 /space831 /exclam832 /quotedbl833 /numbersign834 /dollar835 /percent836 /ampersand837 /quoteright838 /parenleft839 /parenright840 /asterisk841 /plus842 /comma843 /minus844 /period845 /slash846 /zero847 /one848 /two849 /three850 /four851 /five852 /six853 /seven854 /eight855 /nine856 /colon857 /semicolon858 /less859 /equal860 /greater861 /question862 /at863 /A864 /B865 /C866 /D867 /E868 /F869 /G870 /H871 /I872 /J873 /K874 /L875 /M876 /N877 /O878 /P879 /Q880 /R881 /S882 /T883 /U884 /V885 /W886 /X887 /Y888 /Z889 /bracketleft890 /backslash891 /bracketright892 /asciicircum893 /underscore894 /quoteleft895 /a896 /b897 /c898 /d899 /e900 /f901 /g902 /h903 /i904 /j905 /k906 /l907 /m908 /n909 /o910 /p911 /q912 /r913 /s914 /t915 /u916 /v917 /w918 /x919 /y920 /z921 /braceleft922 /bar923 /braceright924 /asciitilde925 /.notdef926 /.notdef927 /.notdef928 /.notdef929 /.notdef930 /.notdef931 /.notdef932 /.notdef933 /.notdef934 /.notdef935 /.notdef936 /.notdef937 /.notdef938 /.notdef939 /.notdef940 /.notdef941 /.notdef942 /dotlessi943 /grave944 /acute945 /circumflex946 /tilde947 /macron948 /breve949 /dotaccent950 /dieresis951 /.notdef952 /ring953 /cedilla954 /.notdef955 /hungarumlaut956 /ogonek957 /caron958 /space959 /exclamdown960 /cent961 /sterling962 /currency963 /yen964 /brokenbar965 /section966 /dieresis967 /copyright968 /ordfeminine969 /guillemotleft970 /logicalnot971 /hyphen972 /registered973 /macron974 /degree975 /plusminus976 /twosuperior977 /threesuperior978 /acute979 /mu980 /paragraph981 /periodcentered982 /cedilla983 /onesuperior984 /ordmasculine985 /guillemotright986 /onequarter987 /onehalf988 /threequarters989 /questiondown990 /Agrave991 /Aacute992 /Acircumflex993 /Atilde994 /Adieresis995 /Aring996 /AE997 /Ccedilla998 /Egrave999 /Eacute1000 /Ecircumflex1001 /Edieresis1002 /Igrave1003 /Iacute1004 /Icircumflex1005 /Idieresis1006 /Eth1007 /Ntilde1008 /Ograve1009 /Oacute1010 /Ocircumflex1011 /Otilde1012 /Odieresis1013 /multiply1014 /Oslash1015 /Ugrave1016 /Uacute1017 /Ucircumflex1018 /Udieresis1019 /Yacute1020 /Thorn1021 /germandbls1022 /agrave1023 /aacute1024 /acircumflex1025 /atilde1026 /adieresis1027 /aring1028 /ae1029 /ccedilla1030 /egrave1031 /eacute1032 /ecircumflex1033 /edieresis1034 /igrave1035 /iacute1036 /icircumflex1037 /idieresis1038 /eth1039 /ntilde1040 /ograve1041 /oacute1042 /ocircumflex1043 /otilde1044 /odieresis1045 /divide1046 /oslash1047 /ugrave1048 /uacute1049 /ucircumflex1050 /udieresis1051 /yacute1052 /thorn1053 /ydieresis1054 ] def1055 //End of ISOLatin1Encoding1056 fi1058 echo "ISOLatin1Encoding /$1 ReEncode"1059 }1061 #1062 # Generating functions output PostScript programs that build font width1063 # tables or a typesetter description file. Send the program to a printer1064 # and the complete table will come back on the serial port. All write on1065 # stdout and assume the prologue and other required PostScript files are1066 # all available.1067 #1069 Proportional() {1070 echo "/unitwidth $UNITWIDTH def"1071 echo "/resolution $RESOLUTION def"1072 echo "/octalescapes $OCTALESCAPES def"1073 echo "/charset ["1074 # Get <>_ and | from S. Use accents for ascii ^ and ~.1075 StandardCharset | awk '1076 $1 == "(<)" && $2 == "/less" {$1 = "(---)"}1077 $1 == "(>)" && $2 == "/greater" {$1 = "(---)"}1078 $1 == "(_)" && $2 == "/underscore" {$1 = "(---)"}1079 $1 == "(|)" && $2 == "/bar" {$1 = "(---)"}1080 $1 == "(^)" && $2 == "/asciicircum" {1081 printf "(^)\t/circumflex\n"1082 $1 = "(---)"1083 }1084 $1 == "(~)" && $2 == "/asciitilde" {1085 printf "(~)\t/tilde\n"1086 $1 = "(---)"1087 }1088 {printf "%s\t%s\n", $1, $2}1089 '1090 echo "] def"1092 Latin1 $21093 echo "/$2 SelectFont"1094 echo "(opO) SetAscender"1096 echo "(name $1\\\\n) Print"1097 echo "(fontname $2\\\\n) Print"1098 echo "/$1 NamedInPrologue"1099 echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"1100 echo "(charset\\\\n) Print"1101 echo "BuildFontCharset"1102 }1104 FixedWidth() {1105 echo "/unitwidth $UNITWIDTH def"1106 echo "/resolution $RESOLUTION def"1107 echo "/octalescapes $OCTALESCAPES def"1108 echo "/charset ["1109 StandardCharset1110 echo "] def"1112 Latin1 $21113 echo "/$2 SelectFont"1114 echo "(opO) SetAscender"1116 echo "(name $1\\\\n) Print"1117 echo "(fontname $2\\\\n) Print"1118 echo "/$1 NamedInPrologue"1119 echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"1120 echo "(charset\\\\n) Print"1121 echo "BuildFontCharset"1122 }1124 Dingbats() {1125 echo "/unitwidth $UNITWIDTH def"1126 echo "/resolution $RESOLUTION def"1127 echo "/octalescapes $OCTALESCAPES def"1128 echo "/charset ["1129 DingbatsCharset | awk '$1 != "(---)" && $2 ~ /^\/[a-zA-Z]/ {1130 printf "%s\tISOLatin1Encoding %s GetCode\n", $1, $21131 }'1132 echo "] def"1134 echo "/$2 SelectFont"1135 echo "( ) SetAscender"1137 echo "(name $1\\\\n) Print"1138 echo "(fontname $2\\\\n) Print"1139 echo "/$1 NamedInPrologue"1140 echo "(charset\\\\n) Print"1141 echo "BuildFontCharset"1142 }1144 Greek() {1145 echo "/unitwidth $UNITWIDTH def"1146 echo "/resolution $RESOLUTION def"1147 echo "/charset ["1148 SymbolCharset | awk '1149 BEGIN {hit = -1}1150 $1 ~ /\(\*[a-zA-Z]\)/ {print; hit = NR}1151 $2 == "(\")" && hit == NR-1 {print; hit = NR}1152 '1153 echo "] def"1155 echo "/$2 SelectFont"1156 echo "(orO) SetAscender"1158 echo "(name $1\\\\n) Print"1159 echo "(fontname $2\\\\n) Print"1160 echo "/$1 NamedInPrologue"1161 echo "(spacewidth ) Print 32 GetWidth Print (\n) Print"1162 echo "(charset\\\\n) Print"1163 echo "BuildFontCharset"1164 }1166 Symbol() {1167 echo "/unitwidth $UNITWIDTH def"1168 echo "/resolution $RESOLUTION def"1169 echo "/charset ["1170 SymbolCharset1171 echo "] def"1173 echo "ChangeMetrics"1174 echo "/S SelectFont"1175 echo "(orO) SetAscender"1177 echo "(name $1\\\\n) Print"1178 echo "(fontname $2\\\\n) Print"1179 echo "/$1 NamedInPrologue"1180 echo "(special\\\\n) Print"1181 echo "(charset\\\\n) Print"1182 echo "BuildFontCharset"1183 }1185 Special() {1186 echo "/unitwidth $UNITWIDTH def"1187 echo "/resolution $RESOLUTION def"1188 echo "/charset ["1189 SpecialCharset1190 echo "] def"1192 echo "ChangeMetrics"1193 echo "/S1 SelectFont"1195 echo "(# Times-Roman special font\\\\n) Print"1196 echo "(name $1\\\\n) Print"1197 echo "(fontname $2\\\\n) Print"1198 echo "/$1 NamedInPrologue"1199 echo "(special\\\\n) Print"1200 echo "(charset\\\\n) Print"1201 echo "BuildFontCharset"1202 }1204 #1205 # The DESC file doesn't have to be built on a printer. It's only here for1206 # consistency.1207 #1209 Description() {1210 echo "/charset [" # awk - so the stack doesn't overflow1211 StandardCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'1212 SymbolCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'1213 SpecialCharset | awk '$1 !~ /\(\\[0-9]/ {print $1}'1214 echo "] def"1216 cat <<-//DESC1217 (#Device Description - utf character set1219 PDL PostScript1220 Encoding Latin11222 fonts 10 R I B BI CW H HI HB S1 S1223 sizes 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 221224 23 24 25 26 27 28 29 30 31 32 33 34 35 36 38 40 42 44 461225 48 50 52 54 56 58 60 64 68 72 78 84 90 96 100 105 110 1151226 120 125 130 135 140 145 150 155 160 01227 res $RESOLUTION1228 hor 11229 vert 11230 unitwidth $UNITWIDTH1232 ) Print1233 //DESC1234 echo "(charset\\\\n) Print"1235 echo "BuildDescCharset"1236 echo "(\\\\n) Print"1237 }