From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- fonts/psfonts/tools/8r.enc | 119 ++++ fonts/psfonts/tools/8r.vec | 256 +++++++++ fonts/psfonts/tools/Makefile | 872 +++++++++++++++++++++++++++++ fonts/psfonts/tools/README | 23 + fonts/psfonts/tools/afm-to-tfm.pl | 471 ++++++++++++++++ fonts/psfonts/tools/check | 9 + fonts/psfonts/tools/checksums/Makefile | 24 + fonts/psfonts/tools/checksums/README | 7 + fonts/psfonts/tools/checksums/addchecksum | 202 +++++++ fonts/psfonts/tools/checksums/cs.1 | 47 ++ fonts/psfonts/tools/checksums/cs.c | 268 +++++++++ fonts/psfonts/tools/checksums/encoding.c | 291 ++++++++++ fonts/psfonts/tools/checksums/msdos/cs.doc | 132 +++++ fonts/psfonts/tools/checksums/texfiles.c | 26 + fonts/psfonts/tools/checksums/texfiles.h | 29 + fonts/psfonts/tools/checksums/uint32.c | 32 ++ fonts/psfonts/tools/checksums/uint32.h | 1 + fonts/psfonts/tools/checksums/verifycs | 149 +++++ fonts/psfonts/tools/ctan-to-tds | 43 ++ fonts/psfonts/tools/dvips.enc | 75 +++ fonts/psfonts/tools/famtool.pl | 566 +++++++++++++++++++ fonts/psfonts/tools/finstex.ltx | 2 + fonts/psfonts/tools/installtree | 81 +++ fonts/psfonts/tools/lucmath/hlcda.tfm | Bin 0 -> 1524 bytes fonts/psfonts/tools/lucmath/hlcdim.tfm | Bin 0 -> 2496 bytes fonts/psfonts/tools/lucmath/hlcdima.tfm | Bin 0 -> 2496 bytes fonts/psfonts/tools/lucmath/hlcdm.tfm | Bin 0 -> 2340 bytes fonts/psfonts/tools/lucmath/hlcdy.tfm | Bin 0 -> 1852 bytes fonts/psfonts/tools/lucmath/hlcra.tfm | Bin 0 -> 1492 bytes fonts/psfonts/tools/lucmath/hlcrim.tfm | Bin 0 -> 2368 bytes fonts/psfonts/tools/lucmath/hlcrima.tfm | Bin 0 -> 2424 bytes fonts/psfonts/tools/lucmath/hlcrm.tfm | Bin 0 -> 2296 bytes fonts/psfonts/tools/lucmath/hlcrv.tfm | Bin 0 -> 1752 bytes fonts/psfonts/tools/lucmath/hlcry.tfm | Bin 0 -> 1824 bytes fonts/psfonts/tools/make-fam.pl | 91 +++ fonts/psfonts/tools/make-one.pl | 61 ++ fonts/psfonts/tools/makemptm.pl | 74 +++ fonts/psfonts/tools/nums.perl | 517 +++++++++++++++++ fonts/psfonts/tools/psyr.afm | 209 +++++++ fonts/psfonts/tools/verifycs2 | 113 ++++ fonts/psfonts/tools/verifycs2.pl | 240 ++++++++ fonts/psfonts/tools/vptovf.ch | 325 +++++++++++ 42 files changed, 5355 insertions(+) create mode 100644 fonts/psfonts/tools/8r.enc create mode 100644 fonts/psfonts/tools/8r.vec create mode 100644 fonts/psfonts/tools/Makefile create mode 100644 fonts/psfonts/tools/README create mode 100644 fonts/psfonts/tools/afm-to-tfm.pl create mode 100644 fonts/psfonts/tools/check create mode 100644 fonts/psfonts/tools/checksums/Makefile create mode 100644 fonts/psfonts/tools/checksums/README create mode 100644 fonts/psfonts/tools/checksums/addchecksum create mode 100644 fonts/psfonts/tools/checksums/cs.1 create mode 100644 fonts/psfonts/tools/checksums/cs.c create mode 100644 fonts/psfonts/tools/checksums/encoding.c create mode 100644 fonts/psfonts/tools/checksums/msdos/cs.doc create mode 100644 fonts/psfonts/tools/checksums/texfiles.c create mode 100644 fonts/psfonts/tools/checksums/texfiles.h create mode 100644 fonts/psfonts/tools/checksums/uint32.c create mode 100644 fonts/psfonts/tools/checksums/uint32.h create mode 100644 fonts/psfonts/tools/checksums/verifycs create mode 100644 fonts/psfonts/tools/ctan-to-tds create mode 100644 fonts/psfonts/tools/dvips.enc create mode 100644 fonts/psfonts/tools/famtool.pl create mode 100644 fonts/psfonts/tools/finstex.ltx create mode 100644 fonts/psfonts/tools/installtree create mode 100644 fonts/psfonts/tools/lucmath/hlcda.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcdim.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcdima.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcdm.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcdy.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcra.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcrim.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcrima.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcrm.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcrv.tfm create mode 100644 fonts/psfonts/tools/lucmath/hlcry.tfm create mode 100644 fonts/psfonts/tools/make-fam.pl create mode 100644 fonts/psfonts/tools/make-one.pl create mode 100644 fonts/psfonts/tools/makemptm.pl create mode 100644 fonts/psfonts/tools/nums.perl create mode 100644 fonts/psfonts/tools/psyr.afm create mode 100644 fonts/psfonts/tools/verifycs2 create mode 100644 fonts/psfonts/tools/verifycs2.pl create mode 100644 fonts/psfonts/tools/vptovf.ch (limited to 'fonts/psfonts/tools') diff --git a/fonts/psfonts/tools/8r.enc b/fonts/psfonts/tools/8r.enc new file mode 100644 index 0000000000..edaaa0539e --- /dev/null +++ b/fonts/psfonts/tools/8r.enc @@ -0,0 +1,119 @@ +% @psencodingfile{ +% author = "S. Rahtz, P. MacKay, Alan Jeffrey, B. Horn, K. Berry", +% version = "0.6", +% date = "22 June 1996", +% filename = "8r.enc", +% email = "kb@mail.tug.org", +% address = "135 Center Hill Rd. // Plymouth, MA 02360", +% codetable = "ISO/ASCII", +% checksum = "119 662 4424", +% docstring = "Encoding for TrueType or Type 1 fonts to be used with TeX." +% } +% +% Idea is to have all the characters normally included in Type 1 fonts +% available for typesetting. This is effectively the characters in Adobe +% Standard Encoding + ISO Latin 1 + extra characters from Lucida. +% +% Character code assignments were made as follows: +% +% (1) the Windows ANSI characters are almost all in their Windows ANSI +% positions, because some Windows users cannot easily reencode the +% fonts, and it makes no difference on other systems. The only Windows +% ANSI characters not available are those that make no sense for +% typesetting -- rubout (127 decimal), nobreakspace (160), softhyphen +% (173). quotesingle and grave are moved just because it's such an +% irritation not having them in TeX positions. +% +% (2) Remaining characters are assigned arbitrarily to the lower part +% of the range, avoiding 0, 10 and 13 in case we meet dumb software. +% +% (3) Y&Y Lucida Bright includes some extra text characters; in the +% hopes that other PostScript fonts, perhaps created for public +% consumption, will include them, they are included starting at 0x12. +% +% (4) Remaining positions left undefined are for use in (hopefully) +% upward-compatible revisions, if someday more characters are generally +% available. +% +% (5) hyphen appears twice for compatibility with both ASCII and Windows. +% +/TeXBase1Encoding [ +% 0x00 (encoded characters from Adobe Standard not in Windows 3.1) + /.notdef /dotaccent /fi /fl + /fraction /hungarumlaut /Lslash /lslash + /ogonek /ring /.notdef + /breve /minus /.notdef +% These are the only two remaining unencoded characters, so may as +% well include them. + /Zcaron /zcaron +% 0x10 + /caron /dotlessi +% (unusual TeX characters available in, e.g., Lucida Bright) + /dotlessj /ff /ffi /ffl + /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef + % very contentious; it's so painful not having quoteleft and quoteright + % at 96 and 145 that we move the things normally found there down to here. + /grave /quotesingle +% 0x20 (ASCII begins) + /space /exclam /quotedbl /numbersign + /dollar /percent /ampersand /quoteright + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash +% 0x30 + /zero /one /two /three /four /five /six /seven + /eight /nine /colon /semicolon /less /equal /greater /question +% 0x40 + /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O +% 0x50 + /P /Q /R /S /T /U /V /W + /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore +% 0x60 + /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o +% 0x70 + /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /asciitilde + /.notdef % rubout; ASCII ends +% 0x80 + /.notdef /.notdef /quotesinglbase /florin + /quotedblbase /ellipsis /dagger /daggerdbl + /circumflex /perthousand /Scaron /guilsinglleft + /OE /.notdef /.notdef /.notdef +% 0x90 + /.notdef /.notdef /.notdef /quotedblleft + /quotedblright /bullet /endash /emdash + /tilde /trademark /scaron /guilsinglright + /oe /.notdef /.notdef /Ydieresis +% 0xA0 + /.notdef % nobreakspace + /exclamdown /cent /sterling + /currency /yen /brokenbar /section + /dieresis /copyright /ordfeminine /guillemotleft + /logicalnot + /hyphen % Y&Y (also at 45); Windows' softhyphen + /registered + /macron +% 0xD0 + /degree /plusminus /twosuperior /threesuperior + /acute /mu /paragraph /periodcentered + /cedilla /onesuperior /ordmasculine /guillemotright + /onequarter /onehalf /threequarters /questiondown +% 0xC0 + /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla + /Egrave /Eacute /Ecircumflex /Edieresis + /Igrave /Iacute /Icircumflex /Idieresis +% 0xD0 + /Eth /Ntilde /Ograve /Oacute + /Ocircumflex /Otilde /Odieresis /multiply + /Oslash /Ugrave /Uacute /Ucircumflex + /Udieresis /Yacute /Thorn /germandbls +% 0xE0 + /agrave /aacute /acircumflex /atilde + /adieresis /aring /ae /ccedilla + /egrave /eacute /ecircumflex /edieresis + /igrave /iacute /icircumflex /idieresis +% 0xF0 + /eth /ntilde /ograve /oacute + /ocircumflex /otilde /odieresis /divide + /oslash /ugrave /uacute /ucircumflex + /udieresis /yacute /thorn /ydieresis +] def diff --git a/fonts/psfonts/tools/8r.vec b/fonts/psfonts/tools/8r.vec new file mode 100644 index 0000000000..33c7478dfa --- /dev/null +++ b/fonts/psfonts/tools/8r.vec @@ -0,0 +1,256 @@ + 0 /.notdef + 1 /dotaccent + 2 /fi + 3 /fl + 4 /fraction + 5 /hungarumlaut + 6 /Lslash + 7 /lslash + 8 /ogonek + 9 /ring + 10 /.notdef + 11 /breve + 12 /minus + 13 /.notdef + 14 /Zcaron + 15 /zcaron + 16 /caron + 17 /dotlessi + 18 /dotlessj + 19 /ff + 20 /ffi + 21 /ffl + 22 /.notdef + 23 /.notdef + 24 /.notdef + 25 /.notdef + 26 /.notdef + 27 /.notdef + 28 /.notdef + 29 /.notdef + 30 /grave + 31 /quotesingle + 32 /space + 33 /exclam + 34 /quotedbl + 35 /numbersign + 36 /dollar + 37 /percent + 38 /ampersand + 39 /quoteright + 40 /parenleft + 41 /parenright + 42 /asterisk + 43 /plus + 44 /comma + 45 /hyphen + 46 /period + 47 /slash + 48 /zero + 49 /one + 50 /two + 51 /three + 52 /four + 53 /five + 54 /six + 55 /seven + 56 /eight + 57 /nine + 58 /colon + 59 /semicolon + 60 /less + 61 /equal + 62 /greater + 63 /question + 64 /at + 65 /A + 66 /B + 67 /C + 68 /D + 69 /E + 70 /F + 71 /G + 72 /H + 73 /I + 74 /J + 75 /K + 76 /L + 77 /M + 78 /N + 79 /O + 80 /P + 81 /Q + 82 /R + 83 /S + 84 /T + 85 /U + 86 /V + 87 /W + 88 /X + 89 /Y + 90 /Z + 91 /bracketleft + 92 /backslash + 93 /bracketright + 94 /asciicircum + 95 /underscore + 96 /quoteleft + 97 /a + 98 /b + 99 /c + 100 /d + 101 /e + 102 /f + 103 /g + 104 /h + 105 /i + 106 /j + 107 /k + 108 /l + 109 /m + 110 /n + 111 /o + 112 /p + 113 /q + 114 /r + 115 /s + 116 /t + 117 /u + 118 /v + 119 /w + 120 /x + 121 /y + 122 /z + 123 /braceleft + 124 /bar + 125 /braceright + 126 /asciitilde + 127 /.notdef + 128 /.notdef + 129 /.notdef + 130 /quotesinglbase + 131 /florin + 132 /quotedblbase + 133 /ellipsis + 134 /dagger + 135 /daggerdbl + 136 /circumflex + 137 /perthousand + 138 /Scaron + 139 /guilsinglleft + 140 /OE + 141 /.notdef + 142 /.notdef + 143 /.notdef + 144 /.notdef + 145 /quoteleft + 146 /quoteright + 147 /quotedblleft + 148 /quotedblright + 149 /bullet + 150 /endash + 151 /emdash + 152 /tilde + 153 /trademark + 154 /scaron + 155 /guilsinglright + 156 /oe + 157 /.notdef + 158 /.notdef + 159 /Ydieresis + 160 /.notdef + 161 /exclamdown + 162 /cent + 163 /sterling + 164 /currency + 165 /yen + 166 /brokenbar + 167 /section + 168 /dieresis + 169 /copyright + 170 /ordfeminine + 171 /guillemotleft + 172 /logicalnot + 173 /hyphen + 174 /registered + 175 /macron + 176 /degree + 177 /plusminus + 178 /twosuperior + 179 /threesuperior + 180 /acute + 181 /mu + 182 /paragraph + 183 /periodcentered + 184 /cedilla + 185 /onesuperior + 186 /ordmasculine + 187 /guillemotright + 188 /onequarter + 189 /onehalf + 190 /threequarters + 191 /questiondown + 192 /Agrave + 193 /Aacute + 194 /Acircumflex + 195 /Atilde + 196 /Adieresis + 197 /Aring + 198 /AE + 199 /Ccedilla + 200 /Egrave + 201 /Eacute + 202 /Ecircumflex + 203 /Edieresis + 204 /Igrave + 205 /Iacute + 206 /Icircumflex + 207 /Idieresis + 208 /Eth + 209 /Ntilde + 210 /Ograve + 211 /Oacute + 212 /Ocircumflex + 213 /Otilde + 214 /Odieresis + 215 /multiply + 216 /Oslash + 217 /Ugrave + 218 /Uacute + 219 /Ucircumflex + 220 /Udieresis + 221 /Yacute + 222 /Thorn + 223 /germandbls + 224 /agrave + 225 /aacute + 226 /acircumflex + 227 /atilde + 228 /adieresis + 229 /aring + 230 /ae + 231 /ccedilla + 232 /egrave + 233 /eacute + 234 /ecircumflex + 235 /edieresis + 236 /igrave + 237 /iacute + 238 /icircumflex + 239 /idieresis + 240 /eth + 241 /ntilde + 242 /ograve + 243 /oacute + 244 /ocircumflex + 245 /otilde + 246 /odieresis + 247 /divide + 248 /oslash + 249 /ugrave + 250 /uacute + 251 /ucircumflex + 252 /udieresis + 253 /yacute + 254 /thorn + 255 /ydieresis diff --git a/fonts/psfonts/tools/Makefile b/fonts/psfonts/tools/Makefile new file mode 100644 index 0000000000..76c9293c52 --- /dev/null +++ b/fonts/psfonts/tools/Makefile @@ -0,0 +1,872 @@ +# +# Make new .tfm files for a variety of +# Adobe and Monotype PostScript fonts, +# and appropriate virtual font files, for T1, OT1 and TS1 encodings. +# +# Sebastian Rahtz January 1992, March 1992, May 1992, October 1992, +# December 1992, March 1993, May 1993, July 1993, January 1994, +# +# from February 1994, uses fontinst +# +# May 1994, June 1994, February 1995, March 1995, April 1995, August 1995, +# +# October 14th 1995 (Berthold Baskerville) +# October 15th 1995 (-narrow calls from David Hull) +# Adapted to generate checksums / Piet Tutelaers (Nov. 1995) +# checked again and updated / SPQR / Nov 22 1995 +# added Adobe Centaur / SPQR / Nov 22 1995 +# cleaned again, added $(ZAP), and misc target / SPQR / Dec 11 1995 +# cleaned again, / SPQR / Jan 26 1996 +#================================================================== +# reworked considerably / SPQR / Jan 22 1997 +# with rewrite of make-fam in Perl. removed some of the functionality +# which Piet had carefully added +# reworked again / SPQR / May 11 1998, added some Softmaker fonts +# +# hacked UV / May 1998 +# added targets for Lucida and Monotype TrueType fonts in Solaris 2.6 +# +# SPQR 1998/07/04: changed a few target names for consistency with fontname +#-------------------------- +# I am using gnu names as default +MKDIR=gmkdir -p +SORT=gsort +RM=rm +CP=cp +MV=mv +OPTIONS= +OUTDIR=.. +#OPTIONS="-debug " +SHELL=/bin/sh +# program names +MAKEFAM=perl make-fam.pl $(OPTIONS) +MAKEONE=perl make-one.pl $(OPTIONS) +AFM2TFM=afm2tfm +AFMTOTFM=perl afm-to-tfm.pl $(OPTIONS) +RM=rm +MV=mv +CP=cp + +# location of output directories +STDOUT=$(OUTDIR)/stdcooked +URWOUT=$(OUTDIR)/stdcooked +ADOBEOUT=$(OUTDIR)/cooked +MONOOUT=$(OUTDIR)/cooked +BITOUT=$(OUTDIR)/cooked +BHOUT=$(OUTDIR)/cooked +IBMOUT=$(OUTDIR)/cooked +SUNOUT=$(OUTDIR)/cooked +ADOBEOUTX=$(OUTDIR)/xcooked +MONOOUTX=$(OUTDIR)/xcooked +BITOUTX=$(OUTDIR)/xcooked +BHOUTX=$(OUTDIR)/xcooked +URWOUTX=$(OUTDIR)/xcooked + +STANDARD= \ + adobe-avantgar \ + adobe-bookman \ + adobe-courier \ + adobe-helvetic \ + adobe-ncntrsbk \ + adobe-palatino \ + adobe-times \ + adobe-zapfchan \ + adobe-mathptm + +SPECIAL= \ + adobe-symbol \ + adobe-zapfding + +USTANDARD= \ + urw-avantgar \ + urw-bookman \ + urw-courier \ + urw-helvetic \ + urw-ncntrsbk \ + urw-palatino \ + urw-times \ + urw-zapfchan \ + urw-misc \ + +USPECIAL= \ + urw-symbol \ + urw-zapfding + +LUCIDA= \ + bh-lucidabright \ + bh-lucidamaths + +SUNLUCIDA= \ + sun-lucidabright + +SUNTRUETYPE=\ + sun-monotype-avantgar \ + sun-monotype-bembo \ + sun-monotype-bookman \ + sun-monotype-courier \ + sun-monotype-gillsans \ + sun-monotype-helvetic \ + sun-monotype-ncntrsbk \ + sun-monotype-palatino \ + sun-monotype-rockwell \ + sun-monotype-symbol \ + sun-monotype-times \ + sun-monotype-zapfchan + + +ADOBEOTHER = \ + adobe-univers \ + adobe-garamond \ + adobe-agaramon \ + adobe-gillsans \ + adobe-baskervi \ + adobe-baskerbe \ + adobe-bbasker \ + adobe-centaur \ + adobe-optima \ + adobe-utopia \ + adobe-bembo \ + adobe-minion \ + adobe-sabon \ + adobe-janson \ + adobe-stone + +MISC2 = \ + bit-charter + +IBM = ibm-timesnew + +MONOTYPE = \ + monotype-abadi \ + monotype-albertus \ + monotype-amasis \ + monotype-apollo \ + monotype-arial \ + monotype-ashleysc \ + monotype-avantgar \ + monotype-basker \ + monotype-bell \ + monotype-bembo \ + monotype-biffo \ + monotype-binnyos \ + monotype-blado \ + monotype-bodoni \ + monotype-bookman \ + monotype-braggado \ + monotype-calisto \ + monotype-calvert \ + monotype-centaur \ + monotype-clarendo \ + monotype-clarion \ + monotype-clearfac \ + monotype-centuros + +MONOTYPE2= \ + monotype-cntursbk \ + monotype-cntursbp \ + monotype-compacta \ + monotype-coronet \ + monotype-courier \ + monotype-dorchesc \ + monotype-egyptext \ + monotype-ehrhardt \ + monotype-ellingtn \ + monotype-falstaff \ + monotype-figaro \ + monotype-forte \ + monotype-garamond \ + monotype-gill \ + monotype-gloucest \ + monotype-goudy \ + monotype-grotesq \ + monotype-headline \ + monotype-horleyos \ + monotype-imprint \ + monotype-inflex \ + monotype-ionic \ + monotype-italnos \ + monotype-janson \ + monotype-joanna \ + monotype-klang \ + monotype-mercursc \ + monotype-modern \ + monotype-monolisc \ + monotype-nberolin \ + monotype-nclarend \ + monotype-newsgth \ + monotype-nimrod \ + monotype-nsplanti \ + monotype-octavian \ + monotype-oldengli \ + monotype-oldstyle \ + monotype-onyx \ + monotype-palacesc \ + monotype-pepita \ + monotype-perpetua \ + monotype-photina \ + monotype-poliphil \ + monotype-sabon \ + monotype-scotchro \ + monotype-script \ + monotype-spectrum \ + monotype-swing \ + monotype-symbol \ + monotype-timesnew \ + monotype-twentyc \ + monotype-typewrit \ + monotype-vandijck \ + monotype-walbaum \ + monotype-zantiqua \ + monotype-zapfchan \ + monotype-zapfding \ + monotype-zeitgeic \ + monotype-zeitgeis + +# +# these cause fontinst to louse up; Monotype Times Cyrillic is +# handled in the separate cyr directory. +# +MONOFUNNY= \ + monotype-bernard \ + monotype-engraver \ + monotype-felix \ + monotype-Mcastellar \ + monotype-clearface \ + monotype-courier \ + monotype-NeographikMT \ + monotype-gillsana \ + monotype-runic + + +all: $(STANDARD) $(SPECIAL) $(USTANDARD) $(USPECIAL) $(ADOBEOTHER) \ + $(MONOTYPE) $(MONOTYPE2) $(LUCIDA) $(MISC1) $(IBM) + +foo: $(MONOTYPE2) + +tools: cs + +cs: checksums/cs.c + (cd checksums; make; $(MV) cs ../cs) + +#------------- +# interesting targets +standard: $(STANDARD) special + +ustandard: $(USTANDARD) uspecial + +special: $(SPECIAL) + +uspecial: $(USPECIAL) + +lucida: $(LUCIDA) + +other: $(ADOBEOTHER) + +monotype: $(MONOTYPE) + +monofunny: $(MONOFUNNY) + +misc: $(MISC1) + +ibm: $(IBM) + +sun: $(SUNTRUETYPE) $(SUNLUCIDA) + +################################################################## +test: + $(MAKEFAM) -outdir $(STDOUT) -sans -nosty phv + +adobe-avantgar: + $(MAKEFAM) -outdir $(STDOUT) -sans -nosty pag + $(AFMTOTFM) pagk -outdir $(STDOUT)/adobe/avantgar + $(AFMTOTFM) pagko -outdir $(STDOUT)/adobe/avantgar + $(AFMTOTFM) pagd -outdir $(STDOUT)/adobe/avantgar + $(AFMTOTFM) pagdo -outdir $(STDOUT)/adobe/avantgar + $(AFMTOTFM) pagkc -outdir $(STDOUT)/adobe/avantgar + $(AFMTOTFM) pagdc -outdir $(STDOUT)/adobe/avantgar + +adobe-bookman: + $(MAKEFAM) -outdir $(STDOUT) -nosty pbk + $(AFMTOTFM) pbkl -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbkli -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbkd -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbkdi -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbklo -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbkdo -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbklc -outdir $(STDOUT)/adobe/bookman + $(AFMTOTFM) pbkdc -outdir $(STDOUT)/adobe/bookman + +adobe-courier: + $(MAKEFAM) -outdir $(STDOUT) -tt pcr + $(AFMTOTFM) pcrr -outdir $(STDOUT)/adobe/courier + $(AFMTOTFM) pcrro -outdir $(STDOUT)/adobe/courier + $(AFMTOTFM) pcrb -outdir $(STDOUT)/adobe/courier + $(AFMTOTFM) pcrbo -outdir $(STDOUT)/adobe/courier + $(AFMTOTFM) pcrrc -outdir $(STDOUT)/adobe/courier + $(AFMTOTFM) pcrbc -outdir $(STDOUT)/adobe/courier + +adobe-helvetic: + $(MAKEFAM) -outdir $(STDOUT) -sans -nosty phv + $(AFMTOTFM) phvr -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvro -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvrrn -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvron -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvb -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvbo -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvbrn -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvbon -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvrc -outdir $(STDOUT)/adobe/helvetic + $(AFMTOTFM) phvbc -outdir $(STDOUT)/adobe/helvetic + sed -e 's/ssub \* phv\/l\/it/ssub \* phv\/m\/sl/' \ + $(STDOUT)/adobe/helvetic/tex/t1phv.fd > x + sed -e 's/ssub \* phv\/l\/ui/ssub \* phv\/m\/n/' \ + x > $(STDOUT)/adobe/helvetic/tex/t1phv.fd + sed -e 's/ssub \* phv\/l\/it/ssub \* phv\/m\/sl/' \ + $(STDOUT)/adobe/helvetic/tex/ot1phv.fd > x + sed -e 's/ssub \* phv\/l\/ui/ssub \* phv\/m\/n/' \ + x > $(STDOUT)/adobe/helvetic/tex/ot1phv.fd + sed -e 's/ssub \* phv\/l\/it/ssub \* phv\/m\/sl/' \ + $(STDOUT)/adobe/helvetic/tex/8rphv.fd > x + sed -e 's/ssub \* phv\/l\/ui/ssub \* phv\/m\/n/' \ + x > $(STDOUT)/adobe/helvetic/tex/8rphv.fd + $(RM) x + +adobe-ncntrsbk: + $(MAKEFAM) -outdir $(STDOUT) -nosty pnc + $(AFMTOTFM) pncr -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncri -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncb -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncbi -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncro -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncbo -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncrc -outdir $(STDOUT)/adobe/ncntrsbk + $(AFMTOTFM) pncbc -outdir $(STDOUT)/adobe/ncntrsbk + +adobe-palatino: + $(MAKEFAM) -outdir $(STDOUT) -nosty ppl + $(AFMTOTFM) pplr -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplri -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplb -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplbi -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplrre -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplrrn -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplro -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplbo -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplru -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplbu -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplrc -outdir $(STDOUT)/adobe/palatino + $(AFMTOTFM) pplbc -outdir $(STDOUT)/adobe/palatino + +adobe-mathptm: + perl makemptm.pl $(OPTIONS) -outdir $(STDOUT) + +adobe-times: + $(MAKEFAM) -outdir $(STDOUT) -nosty ptm + $(AFMTOTFM) ptmr -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmri -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmb -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmbi -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmrre -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmrrn -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmro -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmbo -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmrc -outdir $(STDOUT)/adobe/times + $(AFMTOTFM) ptmbc -outdir $(STDOUT)/adobe/times + ${AFM2TFM} psyr.afm -s .167 psyro >> $(STDOUT)/adobe/times/dvips/ptm.map + ${AFM2TFM} psyr.afm >> $(STDOUT)/adobe/times/dvips/ptm.map + $(CP) psyro.tfm $(STDOUT)/adobe/times/tfm + $(CP) psyr.tfm $(STDOUT)/adobe/times/tfm + $(RM) psyr.tfm psyro.tfm + +adobe-symbol: psyr.afm + $(MAKEONE) -outdir $(STDOUT) psyr + +adobe-zapfchan: + $(MAKEFAM) -outdir $(STDOUT) -nosty pzc + $(AFMTOTFM) pzcmi -outdir $(STDOUT)/adobe/zapfchan + +adobe-zapfding: + $(MAKEONE) -outdir $(STDOUT) pzdr + +adobe-agaramon: + $(MAKEFAM) -outdir $(ADOBEOUT) -download -nosty pad + $(MAKEFAM) -outdir $(ADOBEOUTX) -download -expert x pad + +adobe-garamond: + $(MAKEFAM) -outdir $(ADOBEOUT) -download -nosty pgm + +adobe-sabon: + $(MAKEFAM) -outdir $(ADOBEOUT) -download psb + +adobe-stone: + $(MAKEFAM) -outdir $(ADOBEOUT) -download pst + +adobe-stonesans: + $(MAKEFAM) -outdir $(ADOBEOUT) -download ps8 + +adobe-stoneinf: + $(MAKEFAM) -outdir $(ADOBEOUT) -download psi + +adobe-minion: + $(MAKEFAM) -outdir $(ADOBEOUT) -download pmn + +adobe-baskerbe: + $(MAKEFAM) -outdir $(ADOBEOUT) -download peb + +adobe-utopia: + $(MAKEFAM) -outdir $(ADOBEOUT) -download -nosty put + +adobe-bembo: + $(MAKEFAM) -outdir $(ADOBEOUT) -download -nosty pbb + $(MAKEFAM) -outdir $(ADOBEOUTX) -download -expert x pbb + +adobe-gillsans: + $(MAKEFAM) -outdir $(ADOBEOUT) -sans -download pgs + +adobe-bbasker: + $(MAKEFAM) -outdir $(ADOBEOUT) -download pbv + +adobe-centaur: + $(MAKEFAM) -outdir $(ADOBEOUT) -download pur + $(MAKEFAM) -outdir $(ADOBEOUTX) -download -expert x pur + +adobe-baskervi: + $(MAKEFAM) -outdir $(ADOBEOUT) -download -nosty pnb + +adobe-optima: + $(MAKEFAM) -outdir $(ADOBEOUT) -sans -download pop + +adobe-janson: + $(MAKEFAM) -outdir $(ADOBEOUT) -download pjn + +adobe-plantin: + $(MAKEFAM) -outdir $(ADOBEOUT) -download mpi + $(MAKEFAM) -outdir $(ADOBEOUTX) -download -expert x mpi + +adobe-univers: + $(MAKEFAM) -outdir $(ADOBEOUT) -sans -download pun + + +sun-lucidabright: + $(MAKEFAM) -outdir $(SUNOUT) -download -lucida slh + $(MAKEFAM) -outdir $(SUNOUT) -download -lucida -sans sls + $(MAKEFAM) -outdir $(SUNOUT) -download -lucida -tt slst + + +bh-lucidabright: + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlh + $(MAKEFAM) -outdir $(BHOUT) -download -lucida -sans hls + $(MAKEFAM) -outdir $(BHOUT) -download -lucida -tt -narrow 850 hlct + $(MAKEFAM) -outdir $(BHOUT) -download -lucida -tt -narrow 850 hlst + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlx + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlcf + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlcn + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlcw + $(MAKEFAM) -outdir $(BHOUT) -download -lucida hlce + + +bh-lucidamaths: + $(MKDIR) $(BHOUT)/bh/lumath/tfm + $(MKDIR) $(BHOUT)/bh/lumath/dvips + $(CP) lucmath/*.tfm $(BHOUT)/bh/lumath/tfm + echo 'hlcdim LucidaNewMath-DemiItalic > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcdima LucidaNewMath-AltDemiItalic > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcrim LucidaNewMath-Italic > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcrima LucidaNewMath-AltItalic > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcdy LucidaNewMath-Symbol-Demi > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcra LucidaNewMath-Arrows > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcda LucidaNewMath-Arrows-Demi > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcrv LucidaNewMath-Extension > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcry LucidaNewMath-Symbol > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlcdm LucidaNewMath-Demibold > $(BHOUT)/bh/lumath/dvips/hlcm.map + echo 'hlc$(RM) LucidaNewMath-Roman > $(BHOUT)/bh/lumath/dvips/hlcm.map + + +ibm-timesnew: + $(MAKEFAM) -outdir $(IBMOUT) -download -nosty nnt + +monotype-amasis: + $(MAKEFAM) -outdir $(MONOOUT) -download ma2 + +monotype-arial: + $(MAKEFAM) -outdir $(MONOOUT) -download -sans ma1 + +monotype-ashleysc: + $(MAKEFAM) -outdir $(MONOOUT) -download mah + +monotype-basker: + $(MAKEFAM) -outdir $(MONOOUT) -download mbv + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mbv + +monotype-bembo: + $(MAKEFAM) -outdir $(MONOOUT) -download mbb + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mbb + +monotype-bernard: + $(MAKEFAM) -outdir $(MONOOUT) -download mbn + +monotype-biffo: + $(MAKEFAM) -outdir $(MONOOUT) -download mbf + +monotype-binnyos: + $(MAKEFAM) -outdir $(MONOOUT) -download mb2 + +monotype-bodoni: + $(MAKEFAM) -outdir $(MONOOUT) -download mbd + +monotype-calisto: + $(MAKEFAM) -outdir $(MONOOUT) -download mc1 + +monotype-calvert: + $(MAKEFAM) -outdir $(MONOOUT) -download mc8 + +monotype-centaur: + $(MAKEFAM) -outdir $(MONOOUT) -download mur + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mur + +monotype-clearface: + $(MAKEFAM) -outdir $(MONOOUT) -download mcf + +monotype-clearfac: + $(MAKEFAM) -outdir $(MONOOUT) -download mcf + +monotype-compacta: + $(MAKEFAM) -outdir $(MONOOUT) -download mc7 + +monotype-coronet: + $(MAKEFAM) -outdir $(MONOOUT) -download mot + +monotype-courier: + $(MAKEFAM) -outdir $(MONOOUT) -download -tt mcr + +monotype-dorchesc: + $(MAKEFAM) -outdir $(MONOOUT) -download mds + +monotype-ehrhardt: + $(MAKEFAM) -outdir $(MONOOUT) -download met + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x met + +monotype-engraver: + $(MAKEFAM) -outdir $(MONOOUT) -download men + +monotype-felix: + $(MAKEFAM) -outdir $(MONOOUT) -download mfx + +monotype-garamond: + $(MAKEFAM) -outdir $(MONOOUT) -download mgm + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mgm + +monotype-gill: + $(MAKEFAM) -outdir $(MONOOUT) -download -sans mgs + +monotype-gillsana: + $(MAKEFAM) -outdir $(MONOOUT) -download -sans mga + +monotype-goudy: + $(MAKEFAM) -outdir $(MONOOUT) -download mgo + $(MAKEFAM) -outdir $(MONOOUT) -download mgy + $(MAKEFAM) -outdir $(MONOOUT) -download mg4 + $(MAKEFAM) -outdir $(MONOOUT) -download mg5 + $(MAKEFAM) -outdir $(MONOOUT) -download mgt + +monotype-joanna: + $(MAKEFAM) -outdir $(MONOOUT) -download mjo + +monotype-abadi: + $(MAKEFAM) -outdir $(MONOOUT) -download mai + +monotype-albertus: + $(MAKEFAM) -outdir $(MONOOUT) -download mal + +monotype-apollo: + $(MAKEFAM) -outdir $(MONOOUT) -download map + +monotype-avantgar: + $(MAKEFAM) -outdir $(MONOOUT) -download mag + +monotype-bell: + $(MAKEFAM) -outdir $(MONOOUT) -download mbe + +monotype-blado: + $(MAKEFAM) -outdir $(MONOOUT) -download mb1 + +monotype-bookman: + $(MAKEFAM) -outdir $(MONOOUT) -download mbk + +monotype-braggado: + $(MAKEFAM) -outdir $(MONOOUT) -download mb3 + +monotype-castella: + $(MAKEFAM) -outdir $(MONOOUT) -download mtl + +monotype-centuros: + $(MAKEFAM) -outdir $(MONOOUT) -download mcu + +monotype-cntursbp: + $(MAKEFAM) -outdir $(MONOOUT) -download mcs + +monotype-cntursbk: + $(MAKEFAM) -outdir $(MONOOUT) -download mnc + +monotype-clarion: + $(MAKEFAM) -outdir $(MONOOUT) -download mc6 + +monotype-egyptext: + $(MAKEFAM) -outdir $(MONOOUT) -download mee + +monotype-ellingtn: + $(MAKEFAM) -outdir $(MONOOUT) -download mel + +monotype-falstaff: + $(MAKEFAM) -outdir $(MONOOUT) -download mfs + +monotype-figaro: + $(MAKEFAM) -outdir $(MONOOUT) -download mfi + +monotype-forte: + $(MAKEFAM) -outdir $(MONOOUT) -download mfe + +monotype-gloucest: + $(MAKEFAM) -outdir $(MONOOUT) -download mgr + +monotype-grotesq: + $(MAKEFAM) -outdir $(MONOOUT) -download mgq + +monotype-headline: + $(MAKEFAM) -outdir $(MONOOUT) -download mhd + +monotype-horleyos: + $(MAKEFAM) -outdir $(MONOOUT) -download mho + +monotype-imprint: + $(MAKEFAM) -outdir $(MONOOUT) -download mii + +monotype-inflex: + $(MAKEFAM) -outdir $(MONOOUT) -download mif + +monotype-ionic: + $(MAKEFAM) -outdir $(MONOOUT) -download mio + +monotype-italnos: + $(MAKEFAM) -outdir $(MONOOUT) -download mis + +monotype-janson: + $(MAKEFAM) -outdir $(MONOOUT) -download mjn + +monotype-klang: + $(MAKEFAM) -outdir $(MONOOUT) -download mkl + +monotype-modern: + $(MAKEFAM) -outdir $(MONOOUT) -download mmo + +monotype-nclarend: + $(MAKEFAM) -outdir $(MONOOUT) -download mnn + +monotype-oldengli: + $(MAKEFAM) -outdir $(MONOOUT) -download moe + +monotype-oldstyle: + $(MAKEFAM) -outdir $(MONOOUT) -download mos + +monotype-onyx: + $(MAKEFAM) -outdir $(MONOOUT) -download mox + +monotype-poliphil: + $(MAKEFAM) -outdir $(MONOOUT) -download mpz + +monotype-sabon: + $(MAKEFAM) -outdir $(MONOOUT) -download msb + +monotype-scotchro: + $(MAKEFAM) -outdir $(MONOOUT) -download ms1 + +monotype-spectrum: + $(MAKEFAM) -outdir $(MONOOUT) -download msm + +monotype-symbol: + $(MAKEONE) -outdir $(MONOOUT) -download msyr + +monotype-twentyc: + $(MAKEFAM) -outdir $(MONOOUT) -download mtw + +monotype-vandijck: + $(MAKEFAM) -outdir $(MONOOUT) -download mvd + +monotype-walbaum: + $(MAKEFAM) -outdir $(MONOOUT) -download mwb + +monotype-zantiqua: + $(MAKEFAM) -outdir $(MONOOUT) -download mza + +monotype-zapfchan: + $(MAKEFAM) -outdir $(MONOOUT) -download mzc + +monotype-zapfding: + $(MAKEONE) -outdir $(MONOOUT) -download mzdr + +monotype-mercursc: + $(MAKEFAM) -outdir $(MONOOUT) -download mme + +monotype-monolisc: + $(MAKEFAM) -outdir $(MONOOUT) -download mm1 + +monotype-clarendo: + $(MAKEFAM) -outdir $(MONOOUT) -download mcd + +monotype-neographik: + $(MAKEFAM) -outdir $(MONOOUT) -download mnk + +monotype-nberolin: + $(MAKEFAM) -outdir $(MONOOUT) -download mnr + +monotype-newsgth: + $(MAKEFAM) -outdir $(MONOOUT) -download mng + +monotype-nsplanti: + $(MAKEFAM) -outdir $(MONOOUT) -download mnp + +monotype-nimrod: + $(MAKEFAM) -outdir $(MONOOUT) -download mni + +monotype-octavian: + $(MAKEFAM) -outdir $(MONOOUT) -download mov + +monotype-palacesc: + $(MAKEFAM) -outdir $(MONOOUT) -download mp1 + +monotype-pepita: + $(MAKEFAM) -outdir $(MONOOUT) -download mp2 + +monotype-perpetua: + $(MAKEFAM) -outdir $(MONOOUT) -download mpp + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mpp + +monotype-photina: + $(MAKEFAM) -outdir $(MONOOUT) -download mph + +monotype-runic: + $(MAKEFAM) -outdir $(MONOOUT) -download mru + +monotype-script: + $(MAKEFAM) -outdir $(MONOOUT) -download ms2 + +monotype-swing: + $(MAKEFAM) -outdir $(MONOOUT) -download msw + +monotype-timesnew: + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mnt + $(MAKEFAM) -outdir $(MONOOUT) -download mnt + $(MAKEFAM) -outdir $(MONOOUT) -download mns + +monotype-typewrit: + $(MAKEFAM) -outdir $(MONOOUT) -download -tt mty + +monotype-zeitgeic: + $(MAKEFAM) -outdir $(MONOOUT) -download zmz + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x zmz + +monotype-zeitgeis: + $(MAKEFAM) -outdir $(MONOOUT) -download mzt + $(MAKEFAM) -outdir $(MONOOUTX) -download -expert x mzt + +sun-monotype-avantgar: + $(MAKEFAM) -outdir $(MONOOUT) -nosty -sans mag + +sun-monotype-bembo: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mbb + +sun-monotype-bookman: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mbk + +sun-monotype-courier: + $(MAKEFAM) -outdir $(MONOOUT) -nosty -tt mcr + +sun-monotype-gillsans: + $(MAKEFAM) -outdir $(MONOOUT) -nosty -sans mgs + +sun-monotype-hevetica: + $(MAKEFAM) -outdir $(MONOOUT) -nosty -sans mhv + +sun-monotype-ncntrsbk: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mnc + +sun-monotype-palatino: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mpl + +sun-monotype-rockwell: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mrw + +sun-monotype-times: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mtm + +sun-monotype-zapfchan: + $(MAKEFAM) -outdir $(MONOOUT) -nosty mzc + +sun-monotype-symbol: + $(MAKEONE) -outdir $(MONOOUT) msyr + +urw-misc: + $(MAKEFAM) -outdir $(URWOUT) -download uaq + $(MAKEFAM) -outdir $(URWOUT) -download ugq + $(MAKEFAM) -outdir $(URWOUT) -download unm + $(MAKEFAM) -outdir $(URWOUT) -download -sans unms + $(AFMTOTFM) unmr -outdir $(URWOUT)/urw/nimbus + -$(RM) -f *.vpl + -grep Extend map >> $(URWOUT)/urw/nimbus/dvips/unm.map + -grep Slant map >> $(URWOUT)/urw/nimbus/dvips/unm.map + $(SORT) $(URWOUT)/urw/nimbus/dvips/unm.map | uniq > map + $(CP) map $(URWOUT)/urw/nimbus/dvips/unm.map + $(RM) map + $(AFMTOTFM) unmrs -outdir $(URWOUT)/urw/nimbus + -$(RM) -f *.vpl + -grep Extend map >> $(URWOUT)/urw/nimbus/dvips/unms.map + -grep Slant map >> $(URWOUT)/urw/nimbus/dvips/unms.map + $(SORT) $(URWOUT)/urw/nimbus/dvips/unms.map | uniq > map + $(CP) map $(URWOUT)/urw/nimbus/dvips/unms.map + $(RM) map + $(AFMTOTFM) uaqrrc -outdir $(URWOUT)/urw/antiqua + -$(RM) -f *.vpl + -grep Extend map >> $(URWOUT)/urw/antiqua/dvips/uaq.map + -grep Slant map >> $(URWOUT)/urw/antiqua/dvips/uaq.map + $(SORT) $(URWOUT)/urw/antiqua/dvips/uaq.map | uniq > map + $(CP) map $(URWOUT)/urw/antiqua/dvips/uaq.map + $(RM) map + $(AFMTOTFM) ugqb -outdir $(URWOUT)/urw/grotesq + -$(RM) -f *.vpl + $(SORT) $(URWOUT)/urw/grotesq/dvips/ugq.map | uniq > map + $(CP) map $(URWOUT)/urw/grotesq/dvips/ugq.map + $(RM) map + +urw-avantgar: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty -sans uag + +urw-bookman: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty ubk + +urw-courier: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty -tt ucr + +urw-helvetic: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty -sans uhv + +urw-ncntrsbk: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty unc + +urw-palatino: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty upl + +urw-times: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty utm + +urw-zapfchan: + $(MAKEFAM) -download -outdir $(URWOUT) -nosty uzc + +urw-symbol: + $(MAKEONE) -download -outdir $(URWOUT) usyr + +urw-zapfding: + $(MAKEONE) -download -outdir $(URWOUT) uzdr + + +clean: + $(RM) *.done diff --git a/fonts/psfonts/tools/README b/fonts/psfonts/tools/README new file mode 100644 index 0000000000..382d9dd0f4 --- /dev/null +++ b/fonts/psfonts/tools/README @@ -0,0 +1,23 @@ +This directory contains the working scripts needed to make +the font metrics which form the CTAN fonts/psfonts directory. + +These scripts were originally Unix shell scripts. Many changes to the +scripts were made with Piet to get proper checksums in the fonts, and +make the system more understandable and reliable. They were then +converted to Perl in January 1997 as part of a radical revision, and +they are now hopefully useable. There should be almost no +Unix-dependent material here. + +The makefile gives examples of their usage, or you +can start reading make-fam.pl, most of whose work is done +by subroutines in famtool.pl. + +Volunteers to turn this into a serious Perl tool, and to +document it, are very welcome! + +Sebastian Rahtz +Piet Tutelaers +December 1995 + +Sebastian Rahtz +January/February 1997; September 1997; July 1998 diff --git a/fonts/psfonts/tools/afm-to-tfm.pl b/fonts/psfonts/tools/afm-to-tfm.pl new file mode 100644 index 0000000000..4417209ded --- /dev/null +++ b/fonts/psfonts/tools/afm-to-tfm.pl @@ -0,0 +1,471 @@ +#!/usr/bin/perl +# Make the dvips-encoded vf/tfm using afm2tfm +# Karl Berry, Sebastian Rahtz 1995--1998 +# Assumes web2c 7 setup. +# Translated from sh to Perl, SPQR 1997/09/18 +use English; +use Getopt::Long; +use File::Basename; +use Cwd; + +$filedate="1998/07/04"; +$fileversion="1.1"; + +require "famtool.pl"; +$opt_debug=0; +$opt_verbose=0; + +$result = GetOptions ( +"debug!", +"verbose!", +"outdir=s", # [dir] specifies where the results are to go + ); +if ($result eq 0 ) { die ("OPTION FAILURE"); } +if ($opt_debug) { $opt_verbose=1;} + +$FontName=@ARGV[0]; + + +&texSetup; +mkdir($opt_outdir,0777); +chdir("$opt_outdir"); +$Outdir = getcwd(); +mkdir("$Outdir/vpl",0777); +mkdir("$Outdir/pl",0777); +mkdir("$Outdir/tfm",0777); +mkdir("$Outdir/vf",0777); +mkdir("$Outdir/dvips",0777); +$BaseEnc="8r.enc"; +$UserEnc="dvips.enc"; +$vorV="-v"; +$AtoToptions=""; +$_=$FontName; +($famcode) = /(...).*/; +mkdir("/tmp/Fam_$$",0777); +chdir("/tmp/Fam_$$"); +$Tmpdir=getcwd(); +open(ENC,">8r.enc") || die "cannot open /tmp/Fam_$$/8r.enc"; +open(OLDENC,"$Inidir/8r.enc") || die "cannot open $Inidir/8r.enc"; +while () { print ENC $_; } +close (ENC); +close (OLDENC); +open(ENC,">dvips.enc") || die "cannot open /tmp/Fam_$$/dvips.enc"; +open(OLDENC,"$Inidir/dvips.enc") || die "cannot open $Inidir/dvips.enc"; +while () { print ENC $_; } +close (ENC); +close (OLDENC); +# If we have a natural afm file (e.g., pagko), then we just use +# that. Otherwise (e.g., pplro), we manipulate the roman. Check this first, +# because the natural file might be almost anything (e.g., uaqrrc is not +# smallcaps). +$BaseName=$FontName . "8r"; +$AFMfile=$FontName . "8a"; +print "For $AFMfile, search for $AFMfile.afm first\n" if $opt_verbose; +$AFMpath=`kpsewhich $AFMfile.afm`; +chop $AFMpath; +if ($AFMpath eq "") { +# Determine the AFM file to read for this, and/or the extra options for +# afm2tfm, and/or the name of the base font for the VF. +# +# allow for real narrow AFM files +# + $_=$FontName; + $AFMfile=$FontName . "8a"; + if (/.*on$/) + { +# oblique narrow -> oblique + $BaseName =~ s/on8r$/o8rn/; + $AFMfile =~ s/on8a$/o8an/; + $AFMpath=`kpsewhich $AFMfile.afm`; + chop $AFMpath; + if ($AFMpath eq "") { + $AFMfile =~ s/8an$/8a/; + $AFMpath=`kpsewhich $AFMfile.afm`; + chop $AFMpath; + $AtoToptions="-e .82"; + } + } + elsif (/.*rn$/) { +# upright narrow -> rm + $BaseName =~ s/rrn8r$/r8rn/; + $AFMfile =~ s/rn8a$/8an/; + $AFMpath=`kpsewhich $AFMfile.afm`; + chop $AFMpath; + if ($AFMpath eq "") { + $AFMfile =~ s/8an$/8a/; + $AFMpath=`kpsewhich $AFMfile.afm`; + chop $AFMpath; + $AtoToptions="-e .82"; + } + } + elsif (/.*c$/) { +# caps and small caps -> rm + $AFMfile =~ s/c8a$/8a/; + $BaseName =~ s/c8r$/8r/; + $vorV="-V"; + } + elsif (/.*u$/) { +# unslanted italic -> italic + $AFMfile =~ s/u8a$/i8a/; + $AtoToptions="-s -.1763"; + } + elsif (/.*re$/) { +# extended -> rm + $AFMfile =~ s/re8a$/8a/; + $BaseName =~ s/re8r$/r8re/; + $AtoToptions="-e 1.2"; + } + elsif (/.*o$/) { +# constructed oblique -> rm + $AFMfile =~ s/o8a$/8a/; + $AtoToptions="-s .167"; + } +} +print "now use $AFMfile.afm, and base of $BaseName\n" if $opt_verbose; +$AFMpath=`kpsewhich $AFMfile.afm`; +chop $AFMpath; +if ($AFMpath eq "") { die "no AFM file found: $AFMfile.afm";} +$job="afm2tfm $AFMpath -u -p $BaseEnc -t $UserEnc $AtoToptions $vorV $FontName.vpl $BaseName.tfm"; +print "Run $job\n" if $opt_verbose; +open(JOB,"$job |" ) || die "cannot run $job"; +open(MAP,">>$Outdir/dvips/$famcode.map") ; +while () { + chop; + print "..$_\n" if $opt_verbose; + if (/Extend/) { print MAP "$_\n"; } + elsif (/Slant/) { print MAP "$_\n"; } + else { print "do not use map line $_\n" if $opt_verbose; } +} +close(JOB); +close(MAP); +# We don't want the raw tfms unless we had funny options +if ($AtoToptions eq "") { + print "remove $BaseName.tfm\n" if $opt_verbose; + unlink "$BaseName.tfm"; +} + +# Times-Roman and obliqued Times-Roman can use the Greek letters from Symbol. +if ($FontName eq "ptmr") + { + ptmrGreek("$FontName.vpl"); + } +elsif ($FontName eq "ptmro") + { + ptmroGreek("$FontName.vpl"); + } + +runsystem("vptovf $FontName.vpl $FontName.vf $FontName.tfm"); +&buildfilelist; +print "** Installing PL files in $Outdir/pl\n" if $opt_verbose; + for (grep(/.*\.pl/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/pl/$_") { runsystem("mv $_ $Outdir/pl") ; } + } +print "** Installing VPL files in $Outdir/vpl\n" if $opt_verbose; + for (grep(/.*\.vpl/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/vpl/$_") { runsystem("mv $_ $Outdir/vpl") ; } + } +print "** Installing TFM files in $Outdir/tfm\n" if $opt_verbose; + for (grep(/.*\.tfm/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/tfm/$_") { runsystem("mv $_ $Outdir/tfm") ; } + } +print "** Installing VF files in $Outdir/vf\n" if $opt_verbose; + for (grep(/.*\.vf/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/vf/$_") { runsystem("mv $_ $Outdir/vf") ; } + } +remove_duplicates ("$Outdir/dvips/$famcode.map"); +&Cleanup; + + +print "Done\n" if $opt_verbose; + +sub ptmrGreek { + local($file) = @_; + open(IN,$file); + open(OUT,">$file.new"); +while () { +if (/\(VTITLE/) + { + s/\)/, then edited for Greek)/ ; + print OUT; +} +elsif (/LIGTABLE/) + { print OUT <$file.new"); +while () { +if (/\(VTITLE/) + { + s/\)/, then edited for Greek)/ ; + print OUT; +} +elsif (/LIGTABLE/) + { print OUT < uint32.h + +clean: + rm -f *.o cs uint32 uint32.h diff --git a/fonts/psfonts/tools/checksums/README b/fonts/psfonts/tools/checksums/README new file mode 100644 index 0000000000..62a4cd38e9 --- /dev/null +++ b/fonts/psfonts/tools/checksums/README @@ -0,0 +1,7 @@ +The program cs can read the checksum from any TFM, VF and PK file. +It can also be used to compute a ps2pk compatible checksum for TeX +PostScript fonts. The program is used in addchecksum, a perl-script that +adds checksums to VPL files. + +Piet Tutelaers +November 1995 diff --git a/fonts/psfonts/tools/checksums/addchecksum b/fonts/psfonts/tools/checksums/addchecksum new file mode 100644 index 0000000000..d5919c194f --- /dev/null +++ b/fonts/psfonts/tools/checksums/addchecksum @@ -0,0 +1,202 @@ +#!/usr/local/bin/perl + +# Add checksum to VPL files for all referenced FONTNAME's +# +# Example: +# addchecksum mapfile file[.vpl] ... +# +# Author: Piet Tutelaers (rcpt@urc.tue.nl) +# Version: Nov. 1995 + +$PATHSEP = ':'; +$debug = 1; +$verbose = 1; + +die "[addchecksum] Usage: addchecksum mapfile file[.vpl] ...\n" unless @ARGV > 1; + +# Check required tools +foreach $tool ('cs', 'vptovf', 'pltotf', 'ls') { + die "[addchecksum] $tool not found in $ENV{'PATH'}" unless &where($tool); +} + +# Print everything in order ... +select(STDOUT); $| = 1; + +$mapfile = $ARGV[0]; +die "[addchecksum] $mapfile: can not read" unless -r $mapfile; +shift; + +foreach (@ARGV) { + s/\.(vpl|VPL)//; + $font = $_; + next if $font eq "tmp"; + if (-r "$font.vf") { + print "$font.vpl: skipped ($font.vf available)\n" if $verbose; + next; + } + + die "[addchecksum] Can not open $font.vpl\n" unless open(VPL, "<$font.vpl"); + + print "Processing $font.vpl\n" if $verbose; + open(TMPVPL, ">tmp.vpl"); + print TMPVPL "(COMMENT new FONTCHECKSUMs added)\n"; + while () { + $vpl = $_; + next if (/FONTCHECKSUM/); + if (/FONTNAME/) { + $offset = index($vpl, "FONTNAME"); + $offset = index($vpl, ")", $offset); + die "[addchecksum] Expected a closing brace after FONTNAME in line:", + "\n$vpl" if $offset == -1; + ($fontname) = ($vpl =~ /FONTNAME\s+(\w+)/); + $cs = 0; + if (-r "$fontname.tfm") { + chop($cs = `cs -o "$fontname.tfm"`); + } + elsif (-r "$fontname.pl") { + &make_tfm($fontname); + die "[addchecksum] $fontname: invalid checksum" unless $cs != 0; + } + else { + die "[addchecksum] No font for $fontname\n"; + } + die "[addchecksum] cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + substr($vpl, $offset+1, 0) = " (FONTCHECKSUM O $cs) "; + } + print TMPVPL $vpl; + } + close(VPL); close(TMPVPL); + unlink("$font.vpl"); + rename("tmp.vpl", "$font.vpl"); + print "vptovf $font.vpl $font.vf $font.tfm\n"; + system("vptovf $font.vpl $font.vf $font.tfm"); + die "[addchecksum] vptovf: exit code ", ($? >>8) & 255, "\n" if $?; +} + +# Add CHECKSUM in the same way as AFM2TFM and PS2PK did! +sub make_tfm { + local($texname) = @_; + local($line, $psname, $enc, $extend, $slant, $afmfile); + local($csadded) = 0; + + chop($line = `grep "$texname " $mapfile`); + die "[addchecksum] No mapping information for $texname!\n" if "$line" eq ""; + $line =~ s/^.*://; + + print "Using for $texname '$line'\n" if $verbose; + ($psname) = ($line =~ /[ *]*\S+\s+(\S+)/); + ($enc) = ($line =~ /^.*<(.*\.enc)/); + ($extend) = ($line =~ /.*[^\d.]([0-9.]+)\s+ExtendFont/); + ($slant) = ($line =~ /.*[^\d.]([0-9.]+)\s+SlantFont/); + + $afmfile = &findafm($psname, '.'); + die "[addchecksum] No AFM file for $psname\n" if "$afmfile" eq ""; + + print "Using AFM file $afmfile ($psname) for $texname\n" if $verbose; + + $args = "-n -o "; + $args .= "-e$enc " if $enc; + $args .= "-E$extend " if $extend; + $args .= "-S$slant " if $slant; + print "cs $args $afmfile\n"; + $cs = 0; + chop($cs = `cs $args $afmfile`); + die "[addchecksum] cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + + die "[addchecksum] Wrong checksum for $texname\n" if "$cs" eq ""; + print "$texname.pl: checksum $cs (octal)\n" if $verbose; + + die "[addchecksum] Can not open $texname.pl\n" unless open(PL, "<$texname.pl"); + open(TMPPL, ">tmp.pl"); + print TMPPL "(COMMENT new CHECKSUM added)\n"; + while () { + if (/CHECKSUM/) { + print TMPPL "(CHECKSUM O $cs)\n"; + $csadded = 1; + next; + } + if ($csadded == 0 && /FONTDIMEN/) { + print TMPPL "(CHECKSUM O $cs)\n"; + $csadded = 1; + } + print TMPPL; + } + close(PL); close(TMPPL); + unlink("$fontname.pl"); + rename("tmp.pl", "$fontname.pl"); + print "pltotf $fontname.pl $fontname.tfm\n"; + system("pltotf $fontname.pl $fontname.tfm"); + die "[addchecksum] pltotf: exit code ", ($? >>8) & 255, "\n" if $?; +} + +# +# Next function returns the name of the file containing the wanted +# PostScript font or an empty string if the font is not found +# in . +# +sub findafm { + local($afmname, $afmfontpath) = @_; + local($afmfname, $afmfile, $subdir, @subdirectories); + local($firstdir, $lastdir); + + # Loop through $afmfontpath directories to see if we have one + foreach (split(/$PATHSEP/, $afmfontpath)) { + if (m,//$,) { s,//$,,; + opendir(DIR, $_); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$_/$subdir"; +print "Looking for $afmname in $firstdir/$subdir/$lastdir\n" if $verbose; + $afmfile = &findafm($afmname, "$_/$subdir"); + return $afmfile unless $afmfile eq ''; + } + return ""; + } + elsif (m,//,) { + ($firstdir, $lastdir) = m,^(.*)//(.*)$,; + opendir(DIR, $firstdir); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$firstdir/$subdir"; +print "looking for $afmname in $firstdir/$subdir/$lastdir\n" if $debug; + $afmfile = &findafm($afmname, "$firstdir/$subdir/$lastdir"); + return $afmfile unless $afmfile eq ''; + } + return ""; + } + next unless -d "$_"; + opendir(DIR, "$_"); + @fontfiles=readdir(DIR); + closedir(DIR); + foreach $font (@fontfiles) { + next if ($font eq '.' || $font eq '..'); + next unless $font =~ m#\.afm$#; + $afmfile = "$_/$font"; +print "looking for $afmname in $afmfile\n" if $debug; + chop($afmfname = `grep FontName $afmfile`); + $afmfname =~ s/FontName //; +print "$afmfname in $afmfile\n" if $debug; +print "found $afmfname in $afmfile\n" if $debug && $afmfname eq $afmname; + return $afmfile if $afmfname eq $afmname; + } + } + return ""; +} + +# +# Look for a in $ENV{'PATH'}. Return absolute name of +# when is found and is executable otherwise return empty string. +# +sub where { + local($prog) = @_; + foreach (split(/$PATHSEP/, $ENV{'PATH'})) { + if (-x "$_/$prog") { + return "$_/$prog"; + } + } + return ""; +} diff --git a/fonts/psfonts/tools/checksums/cs.1 b/fonts/psfonts/tools/checksums/cs.1 new file mode 100644 index 0000000000..4d4c6a84b0 --- /dev/null +++ b/fonts/psfonts/tools/checksums/cs.1 @@ -0,0 +1,47 @@ +.TH CS 1 +.SH NAME +cs \- checksum for TeX fonts + +.SH SYNOPSIS +.nf +cs [-o] TeXfont + +cs [-o] [-e] [-S] [-E] AFMfile +.SH DESCRIPTION +This program can read checksums from existing TeX font files (TFM, +PK or VF). It can also compute the checksum for TeX fonts that are +used to cope with PostScript fonts in the same manner as afm2tfm(1), +as part of dvips version 5.487 or higher, and ps2pk(1) do. In the +case of a PostScript font, the checksum will depend upon: +.RS +.nf +- the AFMfile (containing widths for all characters) +- the encoding vector (-e or encoding used in AFMfile) +- the amount of extension used (-E). +.RE +.PP +Slanting has no effect on the checksum because it does not +change the character box. +.SH OPTIONS +.IP "-o" +Print checksum as an octal value. +.IP "-e" +The encoding scheme (default the encoding from the AFM file). +.IP "-E" +The extension factor (real value, default 1.0). +.IP "-S" +The slant (real value, default 0.0). + +.SH EXAMPLES +cs -o cmr10.tfm + +cs -o -eEC.enc Times-Roman.afm + +.SH SEE ALSO +afm2tfm(1), dvips(1), ps2pk(1) +.SH VERSION +1.0 (Januari 1995) +.SH AUTHOR +.nf +Piet Tutelaers +rcpt@urc.tue.nl diff --git a/fonts/psfonts/tools/checksums/cs.c b/fonts/psfonts/tools/checksums/cs.c new file mode 100644 index 0000000000..73139ed15b --- /dev/null +++ b/fonts/psfonts/tools/checksums/cs.c @@ -0,0 +1,268 @@ +/* + * NAME + * cs - checksum for TeX fonts + * SYNOPSIS: + * cs [options] font + * DESCRIPTION + * This program can read checksums from existing TeX font files + * (TFM/PK/VF). It can also compute the checksum for TeX fonts that + * are used to cope with PostScript fonts in the same manner as + * afm2tfm(1), as part of dvips version 5.487 or higher, and ps2pk(1) + * do. In the case of a PostScript font, the checksum will depend upon: + * - the AFM file (containing WX values) + * - the encoding vector (or built-in default encoding) + * - the amount of extension used (-E). + * Slanting has no effect on the checksum because it does not + * change the character box. + * + * Options and arguments: + * -n Use new checksum algorithm. + * -o Print checksum as an octal value. + * -e The encoding scheme (default the encoding from the + * AFM file is used). + * -E The extension factor (real value, default 1.0). + * -S The slant (real value, default 0.0). + * + * font The name of a TeX PK, TFM or VF font, or the name of + * a PostScript AFM file. + * + * SEE ALSO + * afm2tfm(1), dvips(1), ps2pk(1) + * VERSION + * 1.0 (Januari 1995), derived from an earlier version (part of mtpk). + * 1.1 (August 1995), introduced UINT32 type definition so that + * program works correct on 16-bits (Borland C + * on MSDOS) and 64-bits platforms on UNIX + * AUTHOR + * Piet Tutelaers + * rcpt@urc.tue.nl + */ + +#include +#include +#include +#include +#include + +#include "uint32.h" /* typedef UINT32 */ +#include "texfiles.h" + +/* read checksum (non negative integer less than 2^32) */ +UINT32 checksum_texfont(char *name, UINT32 *checksum); + +char *encfile = NULL, *afmfile, *font; + +typedef char *encoding[256]; +void getenc(encoding, int [256]); + +int octal = 0, new = 0; + +main(argc, argv) +int argc; char *argv[]; +{ char *argp, c; + int done, i; + char *myname = "cs"; + + UINT32 cs; + encoding ev; + int WX[256]; + + float efactor = 1.0, slant = 0.0; + + /* proto's */ + char *locate(char *, char *, char *); + UINT32 checksum(encoding, int [256]); + UINT32 new_checksum(encoding, int [256]); + void fatal(char *fmt, ...); + + while (--argc > 0 && (*++argv)[0] == '-') { + done=0; + while ((!done) && (c = *++argv[0])) /* allow -bcK like options */ + switch (c) { + case 'e': + if (*++argv[0] == '\0') { + argc--; argv++; + } + encfile = argv[0]; + done = 1; + break; + case 'E': + if (*++argv[0] == '\0') { + argc--; argv++; + } + efactor = atof(argv[0]); + done = 1; + break; + case 'S': + if (*++argv[0] == '\0') { + argc--; argv++; + } + slant = atof(argv[0]); + done = 1; + break; + case 'n': + new = 1; break; + case 'o': + octal = 1; break; + default: + fatal("%s: %c illegal option\n", myname, c); + } + } + + if (argc < 1 || argc >2) { + printf("cs: version 1.1 (Aug. 1995)\n"); + printf("Usage: cs [-o] TeXfont\n"); + printf(" or: cs [-n] [-o] [-e] [-E] [-S] AFMfile\n"); + exit(1); + } + + font = argv[0]; + + /* Is it a TeX font? */ + if (checksum_texfont(font, &cs)) { + if (octal) +#ifdef __BORLANDC__ + printf("%lo\n", cs); +#else + printf("%o\n", cs); +#endif + else +#ifdef __BORLANDC__ + printf("%lu\n", cs); +#else + printf("%u\n", cs); +#endif + exit(0); + } + + /* It must be an AFM file now */ + afmfile = font; + getenc(ev, WX); + if (efactor != 1.0) + for (i=0; i < 256; i++) { + if (ev[i] == NULL) continue; + WX[i] = WX[i] * efactor + 0.5; + } + + if (new) + cs = new_checksum(ev, WX); + else + cs = checksum(ev, WX); + if (octal) +#ifdef __BORLANDC__ + printf("%lo\n", cs); +#else + printf("%o\n", cs); +#endif + else +#ifdef __BORLANDC__ + printf("%lu\n", cs); +#else + printf("%u\n", cs); +#endif + exit(0); +} + +/* + * The checksum should garantee that our PK file belongs to the correct TFM + * file! Exactly the same as the afm2tfm (dvips5487) calculation. + */ +UINT32 checksum(encoding ev, int width[256]) +{ + int i, leftbit ; + UINT32 s1 = 0, s2 = 0; + char *p ; + + for (i=0; i<256; i++) { + if (ev[i] == NULL) continue; + s1 = (s1<<1) ^ width[i]; /* left shift */ + for (p=ev[i]; *p; p++) + s2 = s2 * 3 + *p ; + } + return (s1<<1) ^ s2 ; +} + +/* + * The proposed new checksum algorithm. + */ +UINT32 new_checksum(encoding ev, int width[256]) +{ + int i, leftbit ; + UINT32 s1 = 0, s2 = 0; + char *p ; + + for (i=0; i<256; i++) { + if (ev[i] == NULL) continue; + s1 = ((s1<<1) ^ (s1>>31)) ^ width[i]; /* cyclic left shift */ + for (p=ev[i]; *p; p++) + s2 = s2 * 3 + *p ; + } + return (s1<<1) ^ s2 ; +} + +/* Give up ... */ +void fatal(char *fmt, ...) +{ va_list args; + + va_start(args, fmt); + vfprintf(stderr, fmt, args); + va_end(args); + exit(1); +} + +#define PKPRE 247 +#define PKID 89 +#define VFID 202 + +#ifdef MSDOS +#define RB "rb" +#else +#define RB "r" +#endif + +/* + * Checksum_texfont() reads the of a TFM file (if filename ends + * with ".tfm"), PK file (if magic code equals PK) or or VF file (if magic + * code equals VF). Function returns 1 upon succes otherwise (no TFM, PK or + * VF file) 0. + */ + +UINT32 checksum_texfont(char *name, UINT32 *checksum) +{ + FILE *fontfp; int id, i; + + if ((fontfp= fopen(name, RB)) == NULL) + fatal("%s: can't open file\n", name); + + if (strcmp(name+strlen(name)-4, ".tfm") ==0) { + + if (fseek(fontfp, 24L, 0)) + { + fclose(fontfp); + fatal("%s: really a TFM font?\n", name); + } + *checksum = four(fontfp); /* checksum */ + fclose(fontfp); + return(1); + } + + /* PK or VF font? */ + if (sone(fontfp) != PKPRE) return 0; + id = sone(fontfp); + if (id == VFID) { + /* skip header */ + for(i=sone(fontfp); i>0; i--) (void)sone(fontfp) ; + *checksum = four(fontfp); /* checksum */ + } + else if (id == PKID) { + /* skip header */ + for(i=sone(fontfp); i>0; i--) (void)sone(fontfp) ; + (void) four(fontfp); /* design size */ + *checksum = four(fontfp); /* checksum */ + } + else return 0; + + fclose(fontfp); + return(1); +} + diff --git a/fonts/psfonts/tools/checksums/encoding.c b/fonts/psfonts/tools/checksums/encoding.c new file mode 100644 index 0000000000..c6ac606cbe --- /dev/null +++ b/fonts/psfonts/tools/checksums/encoding.c @@ -0,0 +1,291 @@ +/* MODULE encoding (encoding.c) + * interface: typedef char *encoding[256]; + * void getenc( + * encoding ev, output encoding + * int width[256]); output widths + * + * depends on: MODULEs binary_table, strings + * + * + * + * + * + * globals: void fatal(); + * + * Author: Piet Tutelaers + * Version 1.3 (August 1992) + * Version 1.4 (December 1993) + */ + +#include +#include +#include +#include + +char *string(char *); +void remove_string(); +void addcc(char *name, int charcode); +int getcc(char *name); +void initcc(); + +extern void fatal(char *fmt, ...); +extern char *encfile, *afmfile; + +/* return a pointer to first non space character after occurence of string t, + * the scan starts at pointer s + */ +static char *value_after(char *s, char *t) +{ int l; + l = strlen(t); + for (;;) { + while (*s != *t && *s != '\n') s++; + if (*s == '\n') return NULL; + if (strncmp(s, t, l) == 0) break; + s++; + } + s += l; + while (isspace(*s)) s++; + return s; +} + +int decimal(char *s) +{ int sign = 1, d = 0; + + while (isspace(*s)) s++; + if (*s == '-') { sign = -1; s++; } + while (isdigit(*s)) { d = d * 10 + (*s - '0'); s++; } + return sign*d; +} + +/* Nextsymbol() reads lines from enc until a '[', '/' or a ']' is + * encountered. In that case pline points to the character following + * this symbol otherwise a fatal error is generated. + */ + +FILE *enc; + +#define LINEBUF 91 +char line[LINEBUF], *pline = NULL; + +char nextsymbol() +{ + for (;;) { + if (pline == NULL) { + if (fgets(line, LINEBUF-1, enc) == NULL) + fatal("unexpected EOF while reading %s\n", encfile); + pline = line; + } + if (*pline == '[' || *pline == ']' || *pline == '/') break; + if (*pline == '%' || *pline == '\n' || *pline == '\0') + { pline = NULL; + continue; + } + pline++; + } + pline++; return *(pline-1); +} + +typedef char *encoding[256]; + +void getenc(encoding ev, int width[256]) +{ int i, SCMseen, Ccnt, wx, cc; + FILE *afm; + char *name, ns; + + for (i=0; i < 256; i++) { ev[i] = NULL; width[i] = -1000; } + if (encfile) { + enc = fopen(encfile, "r"); + if (enc == NULL) fatal("Can't open %s\n", encfile); + if (nextsymbol() != '/') fatal("missing '/encoding' in %s\n", encfile); + if (nextsymbol() != '[') fatal("missing '[' in %s\n", encfile); + i = 0; + while (i < 256 && (ns = nextsymbol()) == '/') { + name = string(pline); + if (strcmp(name, ".notdef") == 0) { + i++; remove_string(); + continue; + } + addcc(name, i++); + } + if (i != 256) fatal("missing %d symbols in %s\n", 256-i, encfile); + if (nextsymbol() != ']') fatal("missing ']' in %s\n", encfile); + fclose(enc); + } + afm = fopen(afmfile, "r"); + if (afm == NULL) fatal("Can't open %s\n", afmfile); + SCMseen = 0; Ccnt = 0; + while (fgets(line, LINEBUF-1, afm)) + if (strncmp(line, "StartCharMetrics", 16) == 0) + { SCMseen = 1; break; } + if (SCMseen == 0) fatal("%s: no valid AFM file\n", afmfile); + while (fgets(line, LINEBUF-1, afm)) { + if (strncmp(line, "EndCharMetrics", 14) == 0) break; + if (strncmp(line, "C ", 2) != 0) + fatal("%s: unexpected line\n", afmfile); + + /* Gracefully terminate when the AFM file is not valid. Every line */ + /* in the AFM file should specify a "C"haracter, a "WX"idth, and */ + /* a "N"ame. (ndw) + */ + pline = value_after(line, "C"); + if (pline == NULL) + fatal("\nBad char metric in %s (no char):\n\t %s\n", afmfile, line); + cc = decimal(pline); + pline = value_after(pline, "WX"); + if (pline == NULL) + fatal("\nBad char metric in %s (no width):\n\t %s\n", afmfile, line); + wx = decimal(pline); + pline = value_after(pline, "N"); + if (pline == NULL) + fatal("\nBad char metric in %s (no name):\n\t %s\n", afmfile, line); + name = string(pline); + + if (encfile) { + if ((i = getcc(name)) == -1) { + remove_string(); + continue; + } + do { /* allow more occurences per name */ + ev[i] = name; width[i] = wx; + i = getcc(name); + } + while (i >= 0); + } + else if (cc >= 0 && cc <= 255) { /* ndw: 10/13/92 */ + ev[cc] = name; width[cc] = wx; + } + else if (cc > 255) + printf("Char code %d ignored (out of range).\n", cc); + Ccnt++; + } + if (Ccnt == 0) fatal("%s: no characters selected\n", afmfile); +} + +/* END MODULE encoding */ + +/* MODULE binary_table + * depends on: MODULE string + * + * + */ + +/* + * TUG has accepted an extended font layout (EC.enc) where the hyphen + * occupies two positions ('055 and '177) to handle exeptional hyphenation + * situations (see TUGboat#11 1990 (no. 4) pp. 514). + * To handle this special case we allow two charcodes per symbol. + */ + +/* + * Two functions for a binary search table. One to add a name and one + * to lookup a name. This table is used to store all encoding names and + * its corresponding charcode. + */ + +struct Node +{ char *name; /* pointer to a PostScript string */ + short cc[2]; /* its charcode's (maximum of two) */ + short left, right; +} node[256]; + +static int freenode = 0; +static short root = -1; + +void addcc(char *name, int charcode) +{ short r, p, q; + + q = root; + while (q != -1) { + p = q; r = strcmp(name, node[p].name); + if (r == 0) { + if (node[p].cc[1] == -1) { + node[p].cc[1] = charcode; + return; + } + else + fatal("%s: more than two codes for %s (%d,%d,%d)\n", + encfile, name, node[p].cc[0], node[p].cc[1], charcode); + } + else if (r < 0) q=node[p].left; + else q=node[p].right; + } + if (freenode == 256) + fatal("%s: too many PostScript names\n", encfile); + /* not found hence insert */ + node[freenode].name = name; + node[freenode].cc[0] = charcode; + node[freenode].cc[1] = -1; + node[freenode].left = node[freenode].right = -1; + if (root == -1) + root = freenode; + else { + if (r < 0) node[p].left=freenode; + else node[p].right=freenode; + } + freenode++; +} + +int getcc(char *name) +{ short r, p, q, cc; + + q = root; + while (q != -1) { + p = q; r = strcmp(name, node[p].name); + if (r == 0) { + cc = node[p].cc[0]; + node[p].cc[0] = node[p].cc[1]; + node[p].cc[1] = -1; + return cc; + } + else if (r < 0) q = node[p].left; + else q = node[p].right; + } + return -1; +} + +/* END MODULE binary_table */ + +/* MODULE string: + * depends on: + * + */ + +/* String() reads a string starting at a given character pointer. + * After removing leading whitespace the resulting string (with possible + * `.' and '_' characters) is stored in a stringpool after which a pointer + * to it is returned. + */ + +#define POOLSIZE 10000 +static char stringpool[POOLSIZE]; +static int poolsize, /* occupied space annex free index */ + lastpoolsize; /* previous poolsize */ + +char *string(char *s) +{ int length; char *str; + + while (isspace(*s)) s++; + str = s; length = 0; + while (isalnum(*s) || *s == '.' || *s == '_') { length++; s++; } + if (length == 0) return NULL; + else { + if (length + 1 > POOLSIZE - poolsize) + fatal("Out of memory %s\n", s); + strncpy(stringpool+poolsize, str, length); + str = stringpool + poolsize; + s = stringpool + poolsize + length; + *s = '\0'; + lastpoolsize = poolsize; + poolsize += length+1; + return str; + } +} + +/* remove last string from stringpool */ +void remove_string() +{ + poolsize = lastpoolsize; +} + +/* END MODULE string */ + diff --git a/fonts/psfonts/tools/checksums/msdos/cs.doc b/fonts/psfonts/tools/checksums/msdos/cs.doc new file mode 100644 index 0000000000..495aa84a11 --- /dev/null +++ b/fonts/psfonts/tools/checksums/msdos/cs.doc @@ -0,0 +1,132 @@ + + + + CCCCSSSS((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV CCCCSSSS((((1111)))) + + + + NNNNAAAAMMMMEEEE + cs - checksum for TeX fonts + + + SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS + cs [-o] TeXfont + + cs [-o] [-e] [-S] [-E] AFMfile + + DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN + This program can read checksums from existing TeX font files + (TFM, PK or VF). It can also compute the checksum for TeX + fonts that are used to cope with PostScript fonts in the + same manner as afm2tfm(1), as part of dvips version 5.487 or + higher, and ps2pk(1) do. In the case of a PostScript font, + the checksum will depend upon: + - the AFMfile (containing widths for all characters) + - the encoding vector (-e or encoding used in AFMfile) + - the amount of extension used (-E). + + Slanting has no effect on the checksum because it does not + change the character box. + + OOOOPPPPTTTTIIIIOOOONNNNSSSS + -o Print checksum as an octal value. + + -e + The encoding scheme (default the encoding from the AFM + file). + + -E + The extension factor (real value, default 1.0). + + -S + The slant (real value, default 0.0). + + + EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS + cs -o cmr10.tfm + + cs -o -eEC.enc Times-Roman.afm + + + SSSSEEEEEEEE AAAALLLLSSSSOOOO + afm2tfm(1), dvips(1), ps2pk(1) + + VVVVEEEERRRRSSSSIIIIOOOONNNN + 1.0 (Januari 1995) + + AAAAUUUUTTTTHHHHOOOORRRR + Piet Tutelaers + rcpt@urc.tue.nl + + + + Page 1 (printed 2/27/96) + + + + + + + CCCCSSSS((((1111)))) UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV CCCCSSSS((((1111)))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Page 2 (printed 2/27/96) + + + + + + diff --git a/fonts/psfonts/tools/checksums/texfiles.c b/fonts/psfonts/tools/checksums/texfiles.c new file mode 100644 index 0000000000..0ec4ce95e0 --- /dev/null +++ b/fonts/psfonts/tools/checksums/texfiles.c @@ -0,0 +1,26 @@ +/* + * File: texfiles.c + * Purpose: basic binary TeX reading functions + * Version: 1.0 (Nov 1993) + * Author: Piet Tutelaers (derived from xdvi/pl16) + */ + +#include +#include "texfiles.h" + +#define one(fp) ((unsigned char) getc(fp)) + +unsigned long num(FILE *fp, int size) +{ unsigned long x = 0; + + while (size--) x = (x << 8) | one(fp); + return x; +} + +integer snum(FILE *fp, int size) +{ integer x; + + x = getc(fp); + while (--size) x = (x << 8) | one(fp); + return x; +} diff --git a/fonts/psfonts/tools/checksums/texfiles.h b/fonts/psfonts/tools/checksums/texfiles.h new file mode 100644 index 0000000000..960c1d7a49 --- /dev/null +++ b/fonts/psfonts/tools/checksums/texfiles.h @@ -0,0 +1,29 @@ +/* + * File: texfiles.h + * Purpose: headerfile for texfiles.c + * Version: 1.0 (Nov 1993) + * Author: Piet Tutelaers + */ + +#ifndef __TEXFILES__ +#define __TEXFILES__ + +#include + +#ifdef MSDOS +typedef long integer ; +#else +typedef int integer ; +#endif + +unsigned long num(FILE *fp, int size); +integer snum(FILE *fp, int size); + +#define one(fp) ((unsigned char) getc(fp)) +#define sone(fp) ((long) one(fp)) +#define two(fp) num (fp, 2) +#define stwo(fp) snum(fp, 2) +#define four(fp) num (fp, 4) +#define sfour(fp) snum(fp, 4) + +#endif /* __TEXFILES__ */ diff --git a/fonts/psfonts/tools/checksums/uint32.c b/fonts/psfonts/tools/checksums/uint32.c new file mode 100644 index 0000000000..1612986ff1 --- /dev/null +++ b/fonts/psfonts/tools/checksums/uint32.c @@ -0,0 +1,32 @@ +/* + * File: uint32.c + * Purpose: determine proper type definition for UINT32 + * + * Version 1.0: Aug. 1995 + */ + +#include + +#define TEST(type) \ + { type s; \ + s = 1; bits = 0; \ + while (s != 0) { s <<= 1; bits++; } \ + if (bits == 32) { \ + printf("typedef %s UINT32;\n", #type); \ + exit(0); \ + } \ + } + +main() { + + int bits; + + TEST(unsigned int); /* 32 bits? */ + TEST(unsigned long); /* 16 bits? */ + TEST(unsigned short); /* 64 bits? */ + + /* What else? */ + fprintf(stderr, "No proper unsigned 32 bit type found\n"); + exit(1); +} + diff --git a/fonts/psfonts/tools/checksums/uint32.h b/fonts/psfonts/tools/checksums/uint32.h new file mode 100644 index 0000000000..042cd70b1a --- /dev/null +++ b/fonts/psfonts/tools/checksums/uint32.h @@ -0,0 +1 @@ +typedef unsigned int UINT32 ; diff --git a/fonts/psfonts/tools/checksums/verifycs b/fonts/psfonts/tools/checksums/verifycs new file mode 100644 index 0000000000..23a4b75bf7 --- /dev/null +++ b/fonts/psfonts/tools/checksums/verifycs @@ -0,0 +1,149 @@ +#!/usr/local/bin/perl + +# File: verifycs +# Purpose: Perl script written to check consistency of psfonts on CTAN. +# Adapt definition of TFMPATH to place where default TFM fonts are. +# Author: Piet Tutelaers (rcpt@urc.tue.nl) +# Version: 1.0 (December 1995) + +$debug = 0; +$TFMPATH = "/usr/local/tex-3.1415/fonts/tfm"; + +die "Usage: verifycs fontdir\n" unless @ARGV == 1; + +$fontdir = $ARGV[0]; + +die "$fontdir: no such directory\n" unless -r $fontdir; + +@tfms = split(/\s+/, `find $fontdir -name "*.tfm" -print`); + +# Loop through TFM files +foreach (@tfms) { + print "Font: $_\n" if $debug; + ($dir, $font) = m#^(.*)/tfm/(.*)\.tfm$#; + if (-r "$dir/vf/$font.vf") { # Virtual font + # Verify checksums + chop($csvf = `cs -o $dir/vf/$font.vf`); + chop($cstfm = `cs -o $dir/tfm/$font.tfm`); + if ("$csvf" ne "$cstfm") { + print "[1] $dir/{vf,tfm}/$font.*: checksum mismatch ($csvf,$cstfm)\n"; + next; + } + + # Now verify fonts referenced in VF file + # We look for information of the form + # (MAPFONT D 0 + # (FONTNAME ptmr8r) + # (FONTCHECKSUM O 24364160751) + # (FONTAT R 1.0) + # (FONTDSIZE R 10.0) + # ) + open(VF, "vftovp $dir/vf/$font.vf $dir/tfm/$font.tfm |"); + while () { + last if (/LIGTABLE/); + if (/MAPFONT/) { + $fontname =""; $checksum = ""; + while () { + ($fontname) = /FONTNAME\s+(\w+)/ if /FONTNAME/; + ($checksum) = /FONTCHECKSUM\s+O\s+(\w+)/ if /FONTCHECKSUM/; + last if /^\s+\)/; + } + if ("$checksum" ne "") { + $tfmfile = &psearch("$dir/..//tfm:$TFMPATH", "$fontname.tfm"); + if ("$tfmfile" eq "") { + print "[2] $dir/vf/$font.vf: $fontname referenced\n"; + next; + } + chop($cstfm = `cs -o $tfmfile`); + if ("$checksum" ne "$cstfm") { + print "[3] $dir/vf/$font.vf: checksum mismatch $fontname against $tfmfile ", + "($checksum,$cstfm)\n"; + next; + } + next; + } + print "[4]$dir/vf/$font.vf: no checksum for mapfont ($fontname)\n"; + } + } + close(VF); + } + else { # Raw font + @lines = `grep "$font\[^a-z\]" $dir/../*/dvips/*.map 2>/dev/null`; + if (@lines == 0) { + print "[5] No mapping information for $font!\n"; + next; + } + chop($line = $lines[0]); + $line =~ s/^.*://; + print "line = $line\n" if $debug; + ($psname) = ($line =~ /[ *]*\S+\s+(\S+)/); + ($enc) = ($line =~ /^.*<(.*\.enc)/); + ($extend) = ($line =~ /.*[^\d.]([0-9.]+)\s+ExtendFont/); + ($slant) = ($line =~ /.*[^\d.]([0-9.]+)\s+SlantFont/); + + $args = "-n -o "; + $args .= "-e$enc " if $enc; + $args .= "-E$extend " if $extend; + $args .= "-S$slant " if $slant; + + @afms = `grep -l \"FontName $psname\$\" $dir/../*/afm/*.afm 2>/dev/null`; + print "@afms" if $debug; + if (@afms == 0) { + print "no AFM file for $font ($psname)\n"; + next; + } + chop($afm = $afms[0]); + + print "cs $args $afm\n" if $debug; + $cs = 0; + chop($cs = `cs $args $afm`); + die "cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + + chop($cstfm = `cs -o $dir/tfm/$font.tfm`); + print "[6]$dir/tfm/$font.tfm ($cstfm): checksum incorrect ($cs)\n" + unless "$cstfm" eq "$cs"; + } +} + +# +# Next function returns the name of the file in the path or empty string +# when not available. +# +sub psearch { + local($path, $filename) = @_; + local($file, $subdir, @subdirectories); + local($firstdir, $lastdir); + + # Loop through $path directories to find $filename + foreach (split(/:/, $path)) { + if (! m,//,) { + return "$_/$filename" if -r "$_/$filename"; + } + elsif (m,//$,) { s,//$,,; + opendir(DIR, $_); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$_/$subdir"; +print "Looking for $filename in $firstdir/$subdir/$lastdir\n" if $debug; + $file = &psearch("$_/$subdir", $filename); + return $file unless $file eq ''; + } + } + elsif (m,//,) { + ($firstdir, $lastdir) = m,^(.*)//(.*)$,; + opendir(DIR, $firstdir); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$firstdir/$subdir"; +print "Looking for $filename in $firstdir/$subdir/$lastdir\n" if $debug; + $file = &psearch("$firstdir/$subdir/$lastdir", $filename); + return $file unless $file eq ''; + } + } + } + return ""; +} diff --git a/fonts/psfonts/tools/ctan-to-tds b/fonts/psfonts/tools/ctan-to-tds new file mode 100644 index 0000000000..1251d8998c --- /dev/null +++ b/fonts/psfonts/tools/ctan-to-tds @@ -0,0 +1,43 @@ +#!/bin/sh +# +# This script takes a CTAN psfonts metrics tree, and copies the files +# to a TDS tree. +# +# Sebastian Rahtz August 1995, January 1997 +# +# Provide a usage message to refresh human memories. +if test \( $# -lt 2 \) +then + echo "Usage: ctan-to-cds CTANdirectory TDSdirectory" + echo "You must supply the name of the font directory you want to transform" + exit 1 +fi +mkdir -p $2 +pushd $2 +DEST=`pwd` +popd +# +pushd $1 +START=`pwd` +VENDOR=`basename $START` +echo Vendor: $VENDOR +for i in * + do + cd $i + H=`pwd` + FAMILY=`basename $H` + echo Family: $FAMILY + mkdir -p $DEST/fonts/tfm/$VENDOR/$FAMILY + cp $START/$FAMILY/tfm/* $DEST/fonts/tfm/$VENDOR/$FAMILY + + mkdir -p $DEST/fonts/vf/$VENDOR/$FAMILY + cp $START/$FAMILY/vf/* $DEST/fonts/vf/$VENDOR/$FAMILY + + mkdir -p $DEST/tex/latex/psnfss + cp $START/$FAMILY/tex/* $DEST/tex/latex/psnfss + + mkdir -p $DEST/dvips/psnfss + cp $START/$FAMILY/dvips/* $DEST/dvips/psnfss + cd .. +done +popd diff --git a/fonts/psfonts/tools/dvips.enc b/fonts/psfonts/tools/dvips.enc new file mode 100644 index 0000000000..dd6334e29a --- /dev/null +++ b/fonts/psfonts/tools/dvips.enc @@ -0,0 +1,75 @@ +% @encodingfile{ +% author = "T. Rokicki, K. Berry", +% version = "2.0", +% date = "23 September 1994", +% filename = "dvips.enc", +% email = "kb@cs.umb.edu", +% address = "135 Center Hill Rd. // Plymouth, MA 02360", +% codetable = "ISO/ASCII", +% checksum = "xx", +% docstring = "An encoding for PostScript fonts to be used with TeX." +% } +% +% This is almost the default encoding produced by the afm2tfm program +% that comes with the dvips distribution, when it is applied to a +% StandardEncoding PostScript font. The positions of the accented +% characters (which afm2tfm assigned more or less randomly in the +% previous set of fonts) have been held fixed. +% +% It is almost upward-compatible with TeX text. (The primary exceptions +% are dotaccent and hungarumlaut.) Some of the ligatures are also in +% different positions, but this is not important, since ligature +% positions are defined in the TFM file, not by macros. +% +% The character positions were assigned in this order: +% 1) non-composite characters in the afm2tfm encoding (except dotlessj +% was included in its plain TeX position); +% 2) available characters in the Cork (EC) encoding; +% 3) remaining composite characters in the base encoding (starting at +% position 130 decimal). We don't include all the other base +% characters because that changes the height/depth/width tables in +% the TFM files (because more characters mean more distinct values). +% +% We leave the initial positions open for the Greek letters in Times-Roman. +% +/DvipsEncoding [ + /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /.notdef /.notdef + /.notdef /quotesingle /exclamdown /questiondown + /dotlessi /dotlessj /grave /acute /caron /breve /macron /ring + /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash + /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright + /parenleft /parenright /asterisk /plus /comma /hyphen /period /slash + /zero /one /two /three /four /five /six /seven + /eight /nine /colon /semicolon /less /equal /greater /question + /at /A /B /C /D /E /F /G + /H /I /J /K /L /M /N /O + /P /Q /R /S /T /U /V /W + /X /Y /Z /bracketleft /backslash /bracketright /circumflex /underscore + /quoteleft /a /b /c /d /e /f /g + /h /i /j /k /l /m /n /o + /p /q /r /s /t /u /v /w + /x /y /z /braceleft /bar /braceright /tilde /dieresis + /asciicircum /asciitilde /Ccedilla /Iacute + /Icircumflex /atilde /edieresis /egrave + /scaron /zcaron /Eth /ff /ffi /ffl /.notdef /.notdef + /.notdef /.notdef /Scaron /.notdef /.notdef /.notdef /.notdef /.notdef + /Ydieresis /.notdef /Zcaron /.notdef /.notdef /.notdef /.notdef /.notdef + /.notdef /.notdef /cent /sterling /fraction /yen /florin /section + /currency /copyright /quotedblleft /guillemotleft + /guilsinglleft /guilsinglright /fi /fl + /degree /endash /dagger /daggerdbl /periodcentered /.notdef /paragraph /bullet + /quotesinglbase /quotedblbase /quotedblright /guillemotright + /ellipsis /perthousand /.notdef /.notdef + /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /.notdef /dotaccent + /Egrave /Eacute /Ecircumflex /Edieresis + /Igrave /hungarumlaut /ogonek /Idieresis + /emdash /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /.notdef + /.notdef /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute /Thorn /.notdef + /agrave /aacute /acircumflex /ordfeminine + /adieresis /aring /.notdef /ccedilla + /Lslash /eacute /ecircumflex /ordmasculine + /igrave /iacute /icircumflex /idieresis + /.notdef /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /.notdef + /lslash /ugrave /uacute /ucircumflex /udieresis /yacute /thorn /ydieresis +] def diff --git a/fonts/psfonts/tools/famtool.pl b/fonts/psfonts/tools/famtool.pl new file mode 100644 index 0000000000..f9dee006f3 --- /dev/null +++ b/fonts/psfonts/tools/famtool.pl @@ -0,0 +1,566 @@ +# +# Perl subroutines to support the AFM to TFM font conversion +# scripts using fontinst +# +# Sebastian Rahtz, January 1997 +# +# 1.0 January 1997 +# 1.1 1997/02/09 +# 1.2 1997/02/13 +# 1.3 1997/09/17 +# 1.4 1997/10/04 +# 1.5 1998/05/19, with help from Ulrik Vieth +# 1.6 1998/06/02, correction from UV +# 1.7 1998/07/04, small changes for fontinst 1.8 and other cleanups +#----------------------------------------------------------------- +sub texSetup { +# +# get the date right +# +($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = + localtime(time); +$year = $year + 1900; +$mon = $mon +1 ; +if ($mon < 10) { $mon= "0" . $mon; } +if ($mday < 10) { $mday= "0" . $mday; } +$Inidir = getcwd(); +if (&IsWin32) { +$ENV{TFMFONTS}=".;"; +} +else +{ +$ENV{TFMFONTS}=".:"; +} + +} +sub Setup { +my ($JOB) = @_; +&texSetup; +if ($opt_outdir eq "") { $opt_outdir=$Inidir; } +&readfontnames; +$_=$JOB; +($sname,$fname,$famextra) = /(.)(..)(.*)/; +$Famcode=$sname . $fname; +$Foundry=$Foundries{$sname}; +$Family=$Typefaces{$fname}; +$ShortFamily=$Shortnames{$fname} . $opt_extra; +$Outdir="$opt_outdir/$Foundry/$ShortFamily"; +if (! -d "$opt_outdir") + { mkdir("$opt_outdir",0777) + || die ("cannot make $opt_outdir"); } +if (! -d "$opt_outdir/$Foundry") + { mkdir("$opt_outdir/$Foundry",0777) + || die ("cannot make $opt_outdir/$Foundry"); } +mkdir("$opt_outdir/$Foundry/$ShortFamily",0777); +mkdir("$Outdir/dvips",0777); +mkdir("$Outdir/tfm",0777); +mkdir("$Outdir/vf",0777); +mkdir("$Outdir/vpl",0777); +mkdir("$Outdir/pl",0777); +mkdir("$Outdir/tex",0777); +print "work on $Famcode$opt_expert ($famextra) / $ShortFamily / $Family\n" if $opt_verbose; +print "TeX search path is $ENV{TEXINPUTS}\n"; +# +# convert relative path to absolute, since we are operating from /tmp +# +chdir("$Outdir") || die ("cannot change directory to $Outdir"); +$Outdir = getcwd(); +print "results to $Outdir\n"; +if (! -d "/tmp/Fam_$$") + { mkdir("/tmp/Fam_$$",0777) + || die ("cannot make dir /tmp/Fam_$$"); } +chdir("/tmp/Fam_$$") || die ("cannot change dir to /tmp/Fam_$$"); +} + +#----------------------------------------------------------------- +sub buildfilelist { + opendir(DIR,'.') + || die ("ERROR: cannot open directory"); + @filenames =grep(!/^\.\.?$/,readdir(DIR)); + closedir(DIR); +} +#----------------------------------------------------------------- +sub readfontnames +{ +my $colA,$colB,$ColC,$ColD; +open(SH,"kpsewhich supplier.map |") + || die "cannot run kpsewhich to get supplier.map"; + $path=; + chop $path; + close(SH); + +open(INF,"$path") || die "cannot open $path"; + while (){ + if (!/^@/) { + ($ColA,$ColB,$ColC)=split; + $Foundries{$ColA} =$ColB; + } + } +close(INF); +open(SH,"kpsewhich typeface.map |") + || die "cannot run kpsewhich to get supplier.map"; + $path=; + chop $path; + close(SH); +open(INF,"$path") || die "cannot open $path"; + while (){ + if (!/^@/) { + ($ColA,$ColB,$ColC,$ColD)=split; + $Typefaces{$ColA} =$ColC; + $Shortnames{$ColA} =$ColB; + } + } +close(INF); +} + +#----------------------------------------------------------------- +sub readAFMfile { + my ($AFMfile) = @_; + my $FontName; + open(AFM,$AFMfile); + while () { + if (/^FontName /) + { ($FontName) = /^FontName ([A-z0-9\-]*)/ ; return $FontName; } + } + close(AFM); + return ""; +} +#----------------------------------------------------------------- +sub installDvips { +$TeXBaseEncoding=`kpsewhich -format='dvips config' 8r.enc`; +chop $TeXBaseEncoding; +open(MAP,">>$Outdir/dvips/$Famcode$opt_extra$famextra.map"); +# 8r names +print "** Making map entries for 8r *.pl files\n"; +for (grep(/.{3,}8r.*\.pl/,@filenames)) { + s/\.pl//; + $Basefile=$_; + s/8r([a-z]?)$/8a$1/; + $AFMfile=`kpsewhich $_.afm`; + if ($AFMfile eq "") + { + $_=$Basefile; + s/8r[a-z]?$/8a/; + $Rawfile=$_; + $AFMfile=`kpsewhich $_.afm`; + } + else + { + $Rawfile=$_; + } + chop $AFMfile ; + if ($AFMfile ne "") + { + $FontName=&readAFMfile($AFMfile); + $FullNames{$Basefile}=$FontName; + print MAP "$Basefile $FontName \"TeXBase1Encoding ReEncodeFont \" <8r.enc "; + if ($opt_download) { print MAP "<$Rawfile.pfb"; } + print MAP "\n"; + &make_tfm($Basefile,$AFMfile,"-e$TeXBaseEncoding"); + } +} +# 8x names +print "** Making map entries for 8x *.pl files\n" if $opt_verbose; +for (grep(/.*8x.*\.pl/,@filenames)) { + s/\.pl//; + $Basefile=$_; + $AFMfile=`kpsewhich $_.afm`; + chop $AFMfile ; + if ($AFMfile ne "") + { + $FontName=&readAFMfile($AFMfile); + $FullNames{$Basefile}=$FontName; + print MAP "$Basefile $FontName "; + if ($opt_download) { print MAP "<$Basefile.pfb"; } + print MAP "\n"; + &make_tfm($Basefile,$AFMfile,""); + } + } +print "** Making map entries for faked fonts\n" if $opt_verbose; +open LOG,"grep \"^Faking \" *.log| " + || die "cannot open grep for Faking"; +while () { + ($Style,$Fake,$Real)=/Faking (.*) font (.*) from (.*)/; + $_=$Real; +# Up must match at least 3 chars, because of StoneSans ps8 family.... + ($Up,$Enc,$Suf) = /(.{3,})(8.)(.*)/; +# print "SHOW ME $Up, $Enc, $Suf from $Real\n"; + $Basefile="$Up$Enc$Suf"; + $Enc =~ s/8r/8a/; + $Rawfile="$Up$Enc$Suf"; + $AFMfile=`kpsewhich $Rawfile.afm`; + chop $AFMfile ; + $csargs=""; + if ($AFMfile ne "") + { + $FontName=&readAFMfile($AFMfile); + print MAP "$Fake $FontName \""; + if ($Style eq "narrow") { + print MAP " $opt_narrow ExtendFont" ; + $csargs=" -E$opt_narrow "; + } + elsif ($Style eq "oblique") { + print MAP " $opt_slant SlantFont" ; + $csargs=" -S$opt_slant "; + } + if ($Enc ne "8x") { + print MAP " TeXBase1Encoding ReEncodeFont \" <8r.enc"; + $csargs .= "-e$TeXBaseEncoding "; + } + else { print MAP "\"";} + if ($opt_download) { print MAP " <$Rawfile.pfb " ; } + print MAP "\n"; + &make_tfm($Fake,$AFMfile,$csargs); + } +} +close LOG; +close MAP; +open CONFIG,">>$Outdir/dvips/config.$Famcode$opt_extra"; +print CONFIG "p +$Famcode$opt_extra.map$famextra\n" ; +close CONFIG; +} + +#----------------------------------------------------------------- + +sub installMetrics { +print "** Making virtual fonts with vptovf\n" if $opt_verbose; +for (grep(/.*\.vpl/,@filenames)) { + s/.vpl//; + my $Basename=$_; + processVPL($Basename); + } + &buildfilelist; +print "** Installing TFM files in $Outdir/tfm\n" if $opt_verbose; + for (grep(/.*\.tfm/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/tfm/$_") { runsystem("mv $_ $Outdir/tfm") ; } + } +print "** Installing VF files in $Outdir/vf\n" if $opt_verbose; + for (grep(/.*\.vf/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/vf/$_") { runsystem("mv $_ $Outdir/vf") ; } + } +print "** Installing VPL files in $Outdir/vpl\n" if $opt_verbose; + for (grep(/.*\.vpl/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/vpl/$_") { runsystem("mv $_ $Outdir/vpl") ; } + } +print "** Installing PL files in $Outdir/pl\n" if $opt_verbose; + for (grep(/.*\.pl/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/pl/$_") { runsystem("mv $_ $Outdir/pl") ; } +} +} + +#----------------------------------------------------------------- +sub make_tfm { +# Add CHECKSUM in the same way as AFM2TFM and PS2PK do +# This is originally by Piet Tutelaers + local($texname,$afmfile,$csargs) = @_; + local $cs = 0; + if (-r "$texname.tfm") { + chop($cs = `cs -o "$texname.tfm"`); + return $cs; + } + chop($cs = `cs -n -o $csargs $afmfile`); + print "make tfm $texname, $afmfile, $csargs\n" if $opt_debug; + die "[addchecksum] cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + + die "[addchecksum] Wrong checksum for $texname\n" if "$cs" eq ""; + print "$texname.pl: cs -n -o $csargs $afmfile -> $cs\n" if $opt_verbose; + die "[addchecksum] Can not open $texname.pl\n" unless open(PL, "<$texname.pl"); + $csadded = 0; + open(TMPPL, ">tmp.pl"); + print TMPPL "(COMMENT new CHECKSUM added)\n"; + while () { + if (/CHECKSUM/) { + print TMPPL "(CHECKSUM O $cs)\n"; + $csadded = 1; + next; + } + if ($csadded == 0 && /FONTDIMEN/) { + print TMPPL "(CHECKSUM O $cs)\n"; + $csadded = 1; + } + print TMPPL; + } + close(PL); close(TMPPL); + unlink("$texname.pl"); + rename("tmp.pl", "$texname.pl"); + print "pltotf $texname.pl $texname.tfm\n" if $opt_debug; + runsystem("pltotf $texname.pl $texname.tfm"); + die "[addchecksum] pltotf: exit code ", ($? >>8) & 255, "\n" if $?; + return $cs; +} + +#----------------------------------------------------------------- +sub processVPL { +# This is originally by Piet Tutelaers + local($font) = @_; + print "Processing $font.vpl\n" if $opt_verbose; + open(VPL,"$font.vpl") + || die "cannot open VPL $font.vpl"; + open(TMPVPL, ">tmp.vpl"); + print TMPVPL "(COMMENT new FONTCHECKSUMs added)\n"; + while () { + $vpl = $_; + next if (/FONTCHECKSUM/); + if (/FONTNAME/) { + $offset = index($vpl, "FONTNAME"); + $offset = index($vpl, ")", $offset); + die "[addchecksum] Expected a closing brace after FONTNAME in line:", + "\n$vpl" if $offset == -1; + ($fontname) = ($vpl =~ /FONTNAME\s+(\w+)/); + $cs = 0; + if (-r "$fontname.tfm") + { + chop($cs = `cs -o "$fontname.tfm"`); + print "Read $cs from $fontname.tfm\n" if $opt_verbose; + } + elsif (-r "$fontname.pl") { + $_=$fontname; + s/8r[a-z]?$/8a/; + $AFMfile=`kpsewhich $_.afm`; + chop($AFMfile); + if ($AFMfile eq "") + { die "No AFM file found for font $_\n"; } + else + { + $cs= &make_tfm($fontname,$AFMfile,""); + print "Generated $cs from $fontname.pl\n" if $opt_verbose; + die "[addchecksum] $fontname: invalid checksum" unless $cs != 0; + } + } + else { +# see it exists on the system + $TFMfile=`kpsewhich $fontname.tfm`; + chop($TFMfile); + if ($TFMfile ne "") { + chop($cs = `cs -o "$TFMfile"`); + print "Read $cs from $TFMfile\n" if $opt_verbose; + } + else + { die "[addchecksum] No font for $fontname\n"; } + } + die "[addchecksum] cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + substr($vpl, $offset+1, 0) = " (FONTCHECKSUM O $cs) "; + } + print TMPVPL $vpl; + } + close(VPL); + close(TMPVPL); + unlink("$font.vpl"); + rename("tmp.vpl", "$font.vpl"); + runsystem("vptovf $font.vpl $font.vf $font.tfm"); + die "[addchecksum] vptovf: exit code ", ($? >>8) & 255, "\n" if $?; +} + +#----------------------------------------------------------------- + +sub runTeX { + open(TEX,">Fam_$$.tex") + || die ("Cannot open Fam_$$.tex"); + if ($opt_verbose) + { print TEX "\\nonstopmode\n" ; } + else + { print TEX "\\batchmode\n" ; } + print TEX "\\input fontinst.sty\n"; + print TEX "\\def\\SlantAmount{",$opt_slant * 1000,"}\n"; + if ($opt_narrow) { print TEX "\\fakenarrow{$opt_narrow}\n" ; } + print TEX "\\latinfamily{$Famcode$opt_expert$famextra}{$ExtraFDcode}\n"; + print TEX "\\end\n"; + close TEX; + runsystem("tex -ini -progname=fontinst ./Fam_$$"); +} + +#----------------------------------------------------------------- +sub installTeX { +local $encoding; +for (grep(/.*\.fd/,@filenames)) { +if (! -r "$Outdir/tex/$_") { + if (/^ot1/) { $encoding = "ot1"; } else { $encoding="other";} + open NEWFD,">$Outdir/tex/$_"; + open OLDFD,"$_"; + while () { + if ($opt_lucida) + { +s/DeclareFontShape/DeclareLucidaFontShape/; +s/^\\DeclareFontFam/\\\@ifundefined{DeclareLucidaFontShape}{\%\n\\def\\DeclareLucidaFontShape#1#2#3#4#5#6{\%\n\\DeclareFontShape{#1}{#2}{#3}{#4}{<->#5}{#6}}}{}\n\\DeclareFontFam/; +s/^ <-> //; +if (/sub /) { s/Lucida//; } + } + if (/endinput/ && $encoding eq "ot1" ) { + print NEWFD "\\DeclareFontShape{OT1}{$Famcode$opt_expert$famextra}{m}{ui}{<->ssub * $Famcode$opt_expert$famextra/m/it}{}\n"; + print NEWFD "\\DeclareFontShape{OT1}{$Famcode$opt_expert$famextra}{b}{ui}{<->ssub * $Famcode$opt_expert$famextra/b/it}{}\n"; + print NEWFD "\\endinput\n"; + } + else { print NEWFD ; } +} + close OLDFD; + close NEWFD; + } +} +# now we have to fix the silly OML and OMS files. bleeargh. +# + if (!$opt_lucida) { +open(CAT,">$Outdir/tex/oms$Famcode$opt_expert$famextra.fd") + || die ("cannot open $Outdir/tex/oms$Famcode$opt_expert$famextra.fd"); +print CAT < ssub * cmsy/m/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{m}{it} + {<-> ssub * cmsy/m/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{m}{sl} + {<-> ssub * cmsy/m/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{m}{sc} + {<-> ssub * cmsy/m/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{b}{n} + {<-> ssub * cmsy/b/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{b}{it} + {<-> ssub * cmsy/b/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{b}{sl} + {<-> ssub * cmsy/b/n}{} +\\DeclareFontShape{OMS}{$Famcode$opt_expert$famextra}{b}{sc} + {<-> ssub * cmsy/b/n}{} +\\endinput +EOFCAT +close CAT; +open (CAT,">$Outdir/tex/oml$Famcode$opt_expert$famextra.fd") + || die ("cannot open $Outdir/tex/oml$Famcode$opt_expert$famextra.fd"); +print CAT < ssub * cmm/m/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{m}{it} + {<-> ssub * cmm/m/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{m}{sl} + {<-> ssub * cmm/m/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{m}{sc} + {<-> ssub * cmm/m/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{b}{n} + {<-> ssub * cmm/b/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{b}{it} + {<-> ssub * cmm/b/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{b}{sl} + {<-> ssub * cmm/b/it}{} +\\DeclareFontShape{OML}{$Famcode$opt_expert$famextra}{b}{sc} + {<-> ssub * cmm/b/it}{} +\\endinput +EOFCAT +} +&install_README; +if ($opt_nosty) { return 0; } +open(CAT,">$Outdir/tex/$opt_expert$ShortFamily.sty"); +print CAT <$Outdir/README"); +print "Installing README in $Outdir\n" if $opt_verbose; +print README <$Outdir/README"); +print "Installing README in $Outdir\n" if $opt_verbose; +print README <) { + $Lines{$_} = 1; + } + close(TMP); + open (TMP,">$filename") + || die "Cannot write $filename to remove duplicates"; + foreach $l (sort keys %Lines) { + print TMP $l; + } + close(TMP); + +} +# +# remove all files corresponding to a pattern +# +sub killfiles { + local($killpatt) = @_; + for (grep(/$killpatt/,@filenames)) { + print "NOTE: removing $_\n" if ($opt_debug); + unlink $_ ; + } + &buildfilelist; +} + +sub runsystem { + local($job) = @_; + $result=system($job); + print "Result $result from $job\n"; +} +sub IsWin32 { + return $^O =~ 'MSWin32'; +} + +sub Cleanup { +if ($opt_debug) { print "Working files are left in /tmp/Fam_$$\n"; } +else { print "remove files from /tmp/Fam_$$\n"; + &buildfilelist; + for (@filenames) { unlink $_; } + chdir($Inidir); + rmdir("/tmp/Fam_$$") ; + } +} +1; diff --git a/fonts/psfonts/tools/finstex.ltx b/fonts/psfonts/tools/finstex.ltx new file mode 100644 index 0000000000..6eb553b560 --- /dev/null +++ b/fonts/psfonts/tools/finstex.ltx @@ -0,0 +1,2 @@ +\input fontinst.sty +\dump \ No newline at end of file diff --git a/fonts/psfonts/tools/installtree b/fonts/psfonts/tools/installtree new file mode 100644 index 0000000000..2ae77a95dd --- /dev/null +++ b/fonts/psfonts/tools/installtree @@ -0,0 +1,81 @@ +#!/tool/bin/perl +# copy PSNFSS tools CTAN output tree to a TDS tree +use English; +use Getopt::Long; +use File::Basename; +use Cwd; + +$filedate="1998/05/12"; +$fileversion="1.0"; + +$opt_debug=0; + +if (&IsWin32) { +open(SH,"kpsewhich -separator=; -expand-path \$TEXMF |") + || die "cannot run kpsewhich to read TEXMF"; + $opt_texdir=; + chop $opt_texdir; + @dirs=split(/;/,$opt_texdir); + } +else +{ +open(SH,"kpsewhich -separator=: -expand-path '\$TEXMF' |") + || die "cannot run kpsewhich to read TEXMF"; + $opt_texdir=; + chop $opt_texdir; + @dirs=split(/:/,$opt_texdir); +} +close(SH); +$opt_texdir=$dirs[0]; + +$result = GetOptions ( +"debug!", +"texdir=s", # TeX tree + ); + +if ($result eq 0 ) { die ("OPTION FAILURE"); } +die "[installtree] Usage: installtree [options] fontdir \n" + unless @ARGV > 0; + +$fontdir=$ARGV[0]; + +chdir("$fontdir") || die ("cannot change directory to $fontdir"); +$base = getcwd(); +@d=split(/\//,$base); +$l=scalar(@d); +$VENDOR=$d[$l-2]; +$FAMILY=$d[$l-1]; +open(README,"README"); + while() { + if (/ \+ a file /) { + ($FAMCODE) = /^ \+ a file ([a-z0-9]*)\.map.*/; + print "family code is $FAMCODE\n"; + } +} +close README; +print "install $fontdir in $opt_texdir, $VENDOR, $FAMILY\n"; +mkdir ("$opt_texdir/fonts",0777); +mkdir ("$opt_texdir/fonts/vf",0777); +mkdir ("$opt_texdir/fonts/tfm",0777); +mkdir ("$opt_texdir/fonts/tfm/$VENDOR",0777); +mkdir ("$opt_texdir/fonts/vf/$VENDOR",0777); +mkdir ("$opt_texdir/fonts/tfm/$VENDOR/$FAMILY",0777); +mkdir ("$opt_texdir/fonts/vf/$VENDOR/$FAMILY",0777); +mkdir ("$opt_texdir/tex",0777); +mkdir ("$opt_texdir/tex/latex",0777); +mkdir ("$opt_texdir/tex/latex/psnfss",0777); +mkdir ("$opt_texdir/tex/latex/psnfss/$FAMCODE",0777); +mkdir ("$opt_texdir/dvips",0777); +mkdir ("$opt_texdir/dvips/psnfss",0777); +mkdir ("$opt_texdir/dvips/psnfss/$FAMCODE",0777); + +system("cp $base/vf/* $opt_texdir/fonts/vf/$VENDOR/$FAMILY"); +system("cp $base/tfm/* $opt_texdir/fonts/tfm/$VENDOR/$FAMILY"); +system("cp $base/tex/* $opt_texdir/tex/latex/psnfss/$FAMCODE"); +system("cp $base/dvips/* $opt_texdir/dvips/psnfss/$FAMCODE"); + +sub IsWin32 { + return $^O =~ 'MSWin32'; +} + +1; diff --git a/fonts/psfonts/tools/lucmath/hlcda.tfm b/fonts/psfonts/tools/lucmath/hlcda.tfm new file mode 100644 index 0000000000..b8feb111e8 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcda.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcdim.tfm b/fonts/psfonts/tools/lucmath/hlcdim.tfm new file mode 100644 index 0000000000..7241660155 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcdim.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcdima.tfm b/fonts/psfonts/tools/lucmath/hlcdima.tfm new file mode 100644 index 0000000000..504a9ae7ec Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcdima.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcdm.tfm b/fonts/psfonts/tools/lucmath/hlcdm.tfm new file mode 100644 index 0000000000..9e3e64f617 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcdm.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcdy.tfm b/fonts/psfonts/tools/lucmath/hlcdy.tfm new file mode 100644 index 0000000000..270b2fbcd0 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcdy.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcra.tfm b/fonts/psfonts/tools/lucmath/hlcra.tfm new file mode 100644 index 0000000000..c50511d3b8 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcra.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcrim.tfm b/fonts/psfonts/tools/lucmath/hlcrim.tfm new file mode 100644 index 0000000000..d3d74aa984 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcrim.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcrima.tfm b/fonts/psfonts/tools/lucmath/hlcrima.tfm new file mode 100644 index 0000000000..3dfb5e5bca Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcrima.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcrm.tfm b/fonts/psfonts/tools/lucmath/hlcrm.tfm new file mode 100644 index 0000000000..770de67074 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcrm.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcrv.tfm b/fonts/psfonts/tools/lucmath/hlcrv.tfm new file mode 100644 index 0000000000..fd501f1ba9 Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcrv.tfm differ diff --git a/fonts/psfonts/tools/lucmath/hlcry.tfm b/fonts/psfonts/tools/lucmath/hlcry.tfm new file mode 100644 index 0000000000..5254320dcb Binary files /dev/null and b/fonts/psfonts/tools/lucmath/hlcry.tfm differ diff --git a/fonts/psfonts/tools/make-fam.pl b/fonts/psfonts/tools/make-fam.pl new file mode 100644 index 0000000000..379ab83724 --- /dev/null +++ b/fonts/psfonts/tools/make-fam.pl @@ -0,0 +1,91 @@ +#!/tool/bin/perl +# +# This script writes a .tex file which does the necessary work +# of converting Adobe Font Metric files for a `normal' font family, +# runs fontinst on it, adds checksums, +# converts the resulting files, +# and installs them in distribution directories. +# +# (c) Sebastian Rahtz February 6th 1994--January 1997. +# Piet Tutelaers (rcpt@urc.tue.nl) added a lot of +# material in the sh version which I have (I hope) +# adapted to Perl properly, and I have also folded in his +# Perl code to add checksums. +# +# 1) run fontinst +# 2) install DVIPS files (result: $OUT/dvips) +# 3) install TFM and VF files (result: $OUT/vf) +# 4) install TFM files (result: $OUT/tfm) +# 5) install FD and STY files (result: $OUT/tex) +# 6) install README file (result: $OUT/README) +#---------------------------------------------------------------- +# The user has to supply the Berry family name, and (optionally) +# any special code to run when the family is loaded. +# The output is: +# - three .fd files (one for T1, one for OT1, and one for 8r) +# - .tfm and .vf files +# - a file .map (could be appended to psfonts.map (for dvips)) +# - a file config. (for use with dvips, referencing psfonts.) +# - a file .sty package file for trivial use of font family +# Intermediate files are deleted. +# + +use English; +use Getopt::Long; +use File::Basename; +use Cwd; + +$filedate="1997/09/17"; +$fileversion="1.2"; + +require "famtool.pl"; + +$opt_debug=0; +$opt_slant=".167"; + +$result = GetOptions ( +"debug!", +"download!",# means that the lines written to psfonts. have " 0; + +&Setup($ARGV[0]); + +$Type="\\rm"; +if ($opt_tt) { $Type="\\tt"; $ExtraFDCode="\\hyphenchar\\font=-1" ;} +if ($opt_sans) { $Type="\\sf"; } +if ($opt_fdcode ne "") { $ExtraFDCode="$opt_fdcode" ;} + +print "Running fontinst TeX job\n" if $opt_verbose; +&runTeX; + +&buildfilelist; + +print "Installing dvips files in $Outdir/dvips\n" if $opt_verbose; +&installDvips; + +print "Installing metric files in $Outdir/tfm and vf\n" if $opt_verbose; +&installMetrics; + +print "Installing LaTeX files in $Outdir/tex\n" if $opt_verbose; +&installTeX; + +&Cleanup; + +print "Done\n" if $opt_verbose; + +#------------------------------------------------------------------- + diff --git a/fonts/psfonts/tools/make-one.pl b/fonts/psfonts/tools/make-one.pl new file mode 100644 index 0000000000..18e6238e76 --- /dev/null +++ b/fonts/psfonts/tools/make-one.pl @@ -0,0 +1,61 @@ +#!/tool/bin/perl +# +# This script converts an Adobe Font Metric file for a special font to +# TeX font metric, and installs it in a distribution directory. It uses +# afm2tfm. +# +# (c) Sebastian Rahtz June 6th 1994 +# revised December 11 1995 +# converted to Perl January 23rd 1997 +# +$filedate="1997/09/17"; +$fileversion="1.2"; +use English; +use Getopt::Long; +use File::Basename; +use Cwd; +require "famtool.pl"; +$opt_debug=0; +$result = GetOptions ( +"debug!", +"download!",# means that the lines written to psfonts. have " 0; + +# Parameters: +# $1 The font name, eg psyr +$thisfont=$ARGV[0]; +&Setup($thisfont); +# +$AFMfile=`kpsewhich $thisfont.afm`; +chop($AFMfile); +if ($AFMfile eq "") { die "cannot find $thisfont.afm"; } +system("afm2tfm $AFMfile $thisfont.tfm "); +$FontName=&readAFMfile($AFMfile); +open(MAP,">$Outdir/dvips/$Famcode.map"); +print MAP "$thisfont $FontName "; +if ($opt_download) { print MAP " <$thisfont.pfb"; } +print MAP "\n"; +close(MAP); +open CONFIG,">$Outdir/dvips/config.$Famcode"; +print CONFIG "p +$Famcode.map\n" ; +close CONFIG; +open (FD,">$Outdir/tex/u$Famcode.fd"); +print FD "\\ProvidesFile{u$Famcode.fd}\n"; +print FD " [$year/$mon/$mday font definitions for U/$Famcode.]\n"; +print FD "\\DeclareFontFamily{U}{$Famcode}{}\n"; +print FD "\\DeclareFontShape{U}{$Famcode}{m}{n}{<->$thisfont}{}\n" ; +print FD "\\endinput\n"; +close FD; +&install_symbol_README; +print "Installing metric files in $Outdir/tfm and vf\n" if $opt_verbose; +&installMetrics; +rmdir("$Outdir/vf"); +&Cleanup; +print "Done\n" if $opt_verbose; diff --git a/fonts/psfonts/tools/makemptm.pl b/fonts/psfonts/tools/makemptm.pl new file mode 100644 index 0000000000..82080c8fe1 --- /dev/null +++ b/fonts/psfonts/tools/makemptm.pl @@ -0,0 +1,74 @@ +#!/usr/bin/perl +use English; +use Getopt::Long; +use File::Basename; +use Cwd; +require "famtool.pl"; +$opt_debug=0; +$result = GetOptions ( +"debug!", +"outdir=s", # [dir] specifies where the results are to go +"verbose!", # be chatty + ); + +if ($result eq 0 ) { die ("OPTION FAILURE"); } +if ($opt_debug) { $opt_verbose=1;} + +&Setup(ptm); +if (&IsWin32) { +$ENV{TFMFONTS}=".;"; +$ENV{TEXINPUTS}=".;$Inidir/mathptm;$Inidir/mathptmx;"; +} +else +{ +$ENV{TEXINPUTS}=".:$Inidir/mathptm:$Inidir/mathptmx:"; +$ENV{TFMFONTS}=".:"; +} + +$JOB="fontptcmx"; +print "Running fontinst fontptcmx TeX job\n" if $opt_verbose; +system("tex -ini -progname=fontinst fontptcmx"); +system("pltotf psyro.pl psyro.tfm"); +$JOB="fontptcm"; +print "Running fontinst fontptcm TeX job\n" if $opt_verbose; +system("tex -ini -progname=fontinst fontptcm"); +&buildfilelist; +print "Installing dvips files in $Outdir/dvips\n" if $opt_verbose; +&installDvips; +print "Installing metric files in $Outdir/tfm and vf\n" if $opt_verbose; +print "** Making virtual fonts with vptovf\n" if $opt_verbose; +for (grep(/.*\.vpl/,@filenames)) { + s/.vpl//; + my $Basename=$_; + processVPL($Basename); + } + &buildfilelist; +# this is a rogue file, a nolig raw tfm + unlink "$Outdir/tfm/pzcmi8r.tfm"; + killfiles('.*8r\.tfm') ; + print "** Installing TFM files in $Outdir/tfm\n" if $opt_verbose; + for (grep(/.*\.tfm/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/tfm/$_") { system("mv $_ $Outdir/tfm") ; } + } + print "** Installing VF files in $Outdir/vf\n" if $opt_verbose; + for (grep(/.*\.vf/,@filenames)) { + print "Installing $_ \n" if $opt_verbose; + if (! -r "$Outdir/vf/$_") { system("mv $_ $Outdir/vf") ; } + } +print "Installing LaTeX files in $Outdir/tex\n" if $opt_verbose; +for (grep(/.*\.fd/,@filenames)) { + if (! -r "$Outdir/tex/$_") { system("cp $_ $Outdir/tex") ; } + } + + +&Cleanup; + +&remove_duplicates("$Outdir/dvips/ptm.map"); +&remove_duplicates("$Outdir/dvips/config.ptm"); +print "Done\n" if $opt_verbose; +#------------------------------------------------------------------- + +sub IsWin32 { + return $^O =~ 'MSWin32'; +} diff --git a/fonts/psfonts/tools/nums.perl b/fonts/psfonts/tools/nums.perl new file mode 100644 index 0000000000..d4949a010e --- /dev/null +++ b/fonts/psfonts/tools/nums.perl @@ -0,0 +1,517 @@ +$hex{"00"}="0"; +$hex{"01"}="1"; +$hex{"02"}="2"; +$hex{"03"}="3"; +$hex{"04"}="4"; +$hex{"05"}="5"; +$hex{"06"}="6"; +$hex{"07"}="7"; +$hex{"08"}="8"; +$hex{"09"}="9"; +$hex{"0A"}="10"; +$hex{"0B"}="11"; +$hex{"0C"}="12"; +$hex{"0D"}="13"; +$hex{"0E"}="14"; +$hex{"0F"}="15"; +$hex{"10"}="16"; +$hex{"11"}="17"; +$hex{"12"}="18"; +$hex{"13"}="19"; +$hex{"14"}="20"; +$hex{"15"}="21"; +$hex{"16"}="22"; +$hex{"17"}="23"; +$hex{"18"}="24"; +$hex{"19"}="25"; +$hex{"1A"}="26"; +$hex{"1B"}="27"; +$hex{"1C"}="28"; +$hex{"1D"}="29"; +$hex{"1E"}="30"; +$hex{"1F"}="31"; +$hex{"20"}="32"; +$hex{"21"}="33"; +$hex{"22"}="34"; +$hex{"23"}="35"; +$hex{"24"}="36"; +$hex{"25"}="37"; +$hex{"26"}="38"; +$hex{"27"}="39"; +$hex{"28"}="40"; +$hex{"29"}="41"; +$hex{"2A"}="42"; +$hex{"2B"}="43"; +$hex{"2C"}="44"; +$hex{"2D"}="45"; +$hex{"2E"}="46"; +$hex{"2F"}="47"; +$hex{"30"}="48"; +$hex{"31"}="49"; +$hex{"32"}="50"; +$hex{"33"}="51"; +$hex{"34"}="52"; +$hex{"35"}="53"; +$hex{"36"}="54"; +$hex{"37"}="55"; +$hex{"38"}="56"; +$hex{"39"}="57"; +$hex{"3A"}="58"; +$hex{"3B"}="59"; +$hex{"3C"}="60"; +$hex{"3D"}="61"; +$hex{"3E"}="62"; +$hex{"3F"}="63"; +$hex{"40"}="64"; +$hex{"41"}="65"; +$hex{"42"}="66"; +$hex{"43"}="67"; +$hex{"44"}="68"; +$hex{"45"}="69"; +$hex{"46"}="70"; +$hex{"47"}="71"; +$hex{"48"}="72"; +$hex{"49"}="73"; +$hex{"4A"}="74"; +$hex{"4B"}="75"; +$hex{"4C"}="76"; +$hex{"4D"}="77"; +$hex{"4E"}="78"; +$hex{"4F"}="79"; +$hex{"50"}="80"; +$hex{"51"}="81"; +$hex{"52"}="82"; +$hex{"53"}="83"; +$hex{"54"}="84"; +$hex{"55"}="85"; +$hex{"56"}="86"; +$hex{"57"}="87"; +$hex{"58"}="88"; +$hex{"59"}="89"; +$hex{"5A"}="90"; +$hex{"5B"}="91"; +$hex{"5C"}="92"; +$hex{"5D"}="93"; +$hex{"5E"}="94"; +$hex{"5F"}="95"; +$hex{"60"}="96"; +$hex{"61"}="97"; +$hex{"62"}="98"; +$hex{"63"}="99"; +$hex{"64"}="100"; +$hex{"65"}="101"; +$hex{"66"}="102"; +$hex{"67"}="103"; +$hex{"68"}="104"; +$hex{"69"}="105"; +$hex{"6A"}="106"; +$hex{"6B"}="107"; +$hex{"6C"}="108"; +$hex{"6D"}="109"; +$hex{"6E"}="110"; +$hex{"6F"}="111"; +$hex{"70"}="112"; +$hex{"71"}="113"; +$hex{"72"}="114"; +$hex{"73"}="115"; +$hex{"74"}="116"; +$hex{"75"}="117"; +$hex{"76"}="118"; +$hex{"77"}="119"; +$hex{"78"}="120"; +$hex{"79"}="121"; +$hex{"7A"}="122"; +$hex{"7B"}="123"; +$hex{"7C"}="124"; +$hex{"7D"}="125"; +$hex{"7E"}="126"; +$hex{"7F"}="127"; +$hex{"80"}="128"; +$hex{"81"}="129"; +$hex{"82"}="130"; +$hex{"83"}="131"; +$hex{"84"}="132"; +$hex{"85"}="133"; +$hex{"86"}="134"; +$hex{"87"}="135"; +$hex{"88"}="136"; +$hex{"89"}="137"; +$hex{"8A"}="138"; +$hex{"8B"}="139"; +$hex{"8C"}="140"; +$hex{"8D"}="141"; +$hex{"8E"}="142"; +$hex{"8F"}="143"; +$hex{"90"}="144"; +$hex{"91"}="145"; +$hex{"92"}="146"; +$hex{"93"}="147"; +$hex{"94"}="148"; +$hex{"95"}="149"; +$hex{"96"}="150"; +$hex{"97"}="151"; +$hex{"98"}="152"; +$hex{"99"}="153"; +$hex{"9A"}="154"; +$hex{"9B"}="155"; +$hex{"9C"}="156"; +$hex{"9D"}="157"; +$hex{"9E"}="158"; +$hex{"9F"}="159"; +$hex{"A0"}="160"; +$hex{"A1"}="161"; +$hex{"A2"}="162"; +$hex{"A3"}="163"; +$hex{"A4"}="164"; +$hex{"A5"}="165"; +$hex{"A6"}="166"; +$hex{"A7"}="167"; +$hex{"A8"}="168"; +$hex{"A9"}="169"; +$hex{"AA"}="170"; +$hex{"AB"}="171"; +$hex{"AC"}="172"; +$hex{"AD"}="173"; +$hex{"AE"}="174"; +$hex{"AF"}="175"; +$hex{"B0"}="176"; +$hex{"B1"}="177"; +$hex{"B2"}="178"; +$hex{"B3"}="179"; +$hex{"B4"}="180"; +$hex{"B5"}="181"; +$hex{"B6"}="182"; +$hex{"B7"}="183"; +$hex{"B8"}="184"; +$hex{"B9"}="185"; +$hex{"BA"}="186"; +$hex{"BB"}="187"; +$hex{"BC"}="188"; +$hex{"BD"}="189"; +$hex{"BE"}="190"; +$hex{"BF"}="191"; +$hex{"C0"}="192"; +$hex{"C1"}="193"; +$hex{"C2"}="194"; +$hex{"C3"}="195"; +$hex{"C4"}="196"; +$hex{"C5"}="197"; +$hex{"C6"}="198"; +$hex{"C7"}="199"; +$hex{"C8"}="200"; +$hex{"C9"}="201"; +$hex{"CA"}="202"; +$hex{"CB"}="203"; +$hex{"CC"}="204"; +$hex{"CD"}="205"; +$hex{"CE"}="206"; +$hex{"CF"}="207"; +$hex{"D0"}="208"; +$hex{"D1"}="209"; +$hex{"D2"}="210"; +$hex{"D3"}="211"; +$hex{"D4"}="212"; +$hex{"D5"}="213"; +$hex{"D6"}="214"; +$hex{"D7"}="215"; +$hex{"D8"}="216"; +$hex{"D9"}="217"; +$hex{"DA"}="218"; +$hex{"DB"}="219"; +$hex{"DC"}="220"; +$hex{"DD"}="221"; +$hex{"DE"}="222"; +$hex{"DF"}="223"; +$hex{"E0"}="224"; +$hex{"E1"}="225"; +$hex{"E2"}="226"; +$hex{"E3"}="227"; +$hex{"E4"}="228"; +$hex{"E5"}="229"; +$hex{"E6"}="230"; +$hex{"E7"}="231"; +$hex{"E8"}="232"; +$hex{"E9"}="233"; +$hex{"EA"}="234"; +$hex{"EB"}="235"; +$hex{"EC"}="236"; +$hex{"ED"}="237"; +$hex{"EE"}="238"; +$hex{"EF"}="239"; +$hex{"F0"}="240"; +$hex{"F1"}="241"; +$hex{"F2"}="242"; +$hex{"F3"}="243"; +$hex{"F4"}="244"; +$hex{"F5"}="245"; +$hex{"F6"}="246"; +$hex{"F7"}="247"; +$hex{"F8"}="248"; +$hex{"F9"}="249"; +$hex{"FA"}="250"; +$hex{"FB"}="251"; +$hex{"FC"}="252"; +$hex{"FD"}="253"; +$hex{"FE"}="254"; +$hex{"FF"}="255"; +$oct{"0"}="0"; +$oct{"1"}="1"; +$oct{"2"}="2"; +$oct{"3"}="3"; +$oct{"4"}="4"; +$oct{"5"}="5"; +$oct{"6"}="6"; +$oct{"7"}="7"; +$oct{"10"}="8"; +$oct{"11"}="9"; +$oct{"12"}="10"; +$oct{"13"}="11"; +$oct{"14"}="12"; +$oct{"15"}="13"; +$oct{"16"}="14"; +$oct{"17"}="15"; +$oct{"20"}="16"; +$oct{"21"}="17"; +$oct{"22"}="18"; +$oct{"23"}="19"; +$oct{"24"}="20"; +$oct{"25"}="21"; +$oct{"26"}="22"; +$oct{"27"}="23"; +$oct{"30"}="24"; +$oct{"31"}="25"; +$oct{"32"}="26"; +$oct{"33"}="27"; +$oct{"34"}="28"; +$oct{"35"}="29"; +$oct{"36"}="30"; +$oct{"37"}="31"; +$oct{"40"}="32"; +$oct{"41"}="33"; +$oct{"42"}="34"; +$oct{"43"}="35"; +$oct{"44"}="36"; +$oct{"45"}="37"; +$oct{"46"}="38"; +$oct{"47"}="39"; +$oct{"50"}="40"; +$oct{"51"}="41"; +$oct{"52"}="42"; +$oct{"53"}="43"; +$oct{"54"}="44"; +$oct{"55"}="45"; +$oct{"56"}="46"; +$oct{"57"}="47"; +$oct{"60"}="48"; +$oct{"61"}="49"; +$oct{"62"}="50"; +$oct{"63"}="51"; +$oct{"64"}="52"; +$oct{"65"}="53"; +$oct{"66"}="54"; +$oct{"67"}="55"; +$oct{"70"}="56"; +$oct{"71"}="57"; +$oct{"72"}="58"; +$oct{"73"}="59"; +$oct{"74"}="60"; +$oct{"75"}="61"; +$oct{"76"}="62"; +$oct{"77"}="63"; +$oct{"100"}="64"; +$oct{"101"}="65"; +$oct{"102"}="66"; +$oct{"103"}="67"; +$oct{"104"}="68"; +$oct{"105"}="69"; +$oct{"106"}="70"; +$oct{"107"}="71"; +$oct{"110"}="72"; +$oct{"111"}="73"; +$oct{"112"}="74"; +$oct{"113"}="75"; +$oct{"114"}="76"; +$oct{"115"}="77"; +$oct{"116"}="78"; +$oct{"117"}="79"; +$oct{"120"}="80"; +$oct{"121"}="81"; +$oct{"122"}="82"; +$oct{"123"}="83"; +$oct{"124"}="84"; +$oct{"125"}="85"; +$oct{"126"}="86"; +$oct{"127"}="87"; +$oct{"130"}="88"; +$oct{"131"}="89"; +$oct{"132"}="90"; +$oct{"133"}="91"; +$oct{"134"}="92"; +$oct{"135"}="93"; +$oct{"136"}="94"; +$oct{"137"}="95"; +$oct{"140"}="96"; +$oct{"141"}="97"; +$oct{"142"}="98"; +$oct{"143"}="99"; +$oct{"144"}="100"; +$oct{"145"}="101"; +$oct{"146"}="102"; +$oct{"147"}="103"; +$oct{"150"}="104"; +$oct{"151"}="105"; +$oct{"152"}="106"; +$oct{"153"}="107"; +$oct{"154"}="108"; +$oct{"155"}="109"; +$oct{"156"}="110"; +$oct{"157"}="111"; +$oct{"160"}="112"; +$oct{"161"}="113"; +$oct{"162"}="114"; +$oct{"163"}="115"; +$oct{"164"}="116"; +$oct{"165"}="117"; +$oct{"166"}="118"; +$oct{"167"}="119"; +$oct{"170"}="120"; +$oct{"171"}="121"; +$oct{"172"}="122"; +$oct{"173"}="123"; +$oct{"174"}="124"; +$oct{"175"}="125"; +$oct{"176"}="126"; +$oct{"177"}="127"; +$oct{"200"}="128"; +$oct{"201"}="129"; +$oct{"202"}="130"; +$oct{"203"}="131"; +$oct{"204"}="132"; +$oct{"205"}="133"; +$oct{"206"}="134"; +$oct{"207"}="135"; +$oct{"210"}="136"; +$oct{"211"}="137"; +$oct{"212"}="138"; +$oct{"213"}="139"; +$oct{"214"}="140"; +$oct{"215"}="141"; +$oct{"216"}="142"; +$oct{"217"}="143"; +$oct{"220"}="144"; +$oct{"221"}="145"; +$oct{"222"}="146"; +$oct{"223"}="147"; +$oct{"224"}="148"; +$oct{"225"}="149"; +$oct{"226"}="150"; +$oct{"227"}="151"; +$oct{"230"}="152"; +$oct{"231"}="153"; +$oct{"232"}="154"; +$oct{"233"}="155"; +$oct{"234"}="156"; +$oct{"235"}="157"; +$oct{"236"}="158"; +$oct{"237"}="159"; +$oct{"240"}="160"; +$oct{"241"}="161"; +$oct{"242"}="162"; +$oct{"243"}="163"; +$oct{"244"}="164"; +$oct{"245"}="165"; +$oct{"246"}="166"; +$oct{"247"}="167"; +$oct{"250"}="168"; +$oct{"251"}="169"; +$oct{"252"}="170"; +$oct{"253"}="171"; +$oct{"254"}="172"; +$oct{"255"}="173"; +$oct{"256"}="174"; +$oct{"257"}="175"; +$oct{"260"}="176"; +$oct{"261"}="177"; +$oct{"262"}="178"; +$oct{"263"}="179"; +$oct{"264"}="180"; +$oct{"265"}="181"; +$oct{"266"}="182"; +$oct{"267"}="183"; +$oct{"270"}="184"; +$oct{"271"}="185"; +$oct{"272"}="186"; +$oct{"273"}="187"; +$oct{"274"}="188"; +$oct{"275"}="189"; +$oct{"276"}="190"; +$oct{"277"}="191"; +$oct{"300"}="192"; +$oct{"301"}="193"; +$oct{"302"}="194"; +$oct{"303"}="195"; +$oct{"304"}="196"; +$oct{"305"}="197"; +$oct{"306"}="198"; +$oct{"307"}="199"; +$oct{"310"}="200"; +$oct{"311"}="201"; +$oct{"312"}="202"; +$oct{"313"}="203"; +$oct{"314"}="204"; +$oct{"315"}="205"; +$oct{"316"}="206"; +$oct{"317"}="207"; +$oct{"320"}="208"; +$oct{"321"}="209"; +$oct{"322"}="210"; +$oct{"323"}="211"; +$oct{"324"}="212"; +$oct{"325"}="213"; +$oct{"326"}="214"; +$oct{"327"}="215"; +$oct{"330"}="216"; +$oct{"331"}="217"; +$oct{"332"}="218"; +$oct{"333"}="219"; +$oct{"334"}="220"; +$oct{"335"}="221"; +$oct{"336"}="222"; +$oct{"337"}="223"; +$oct{"340"}="224"; +$oct{"341"}="225"; +$oct{"342"}="226"; +$oct{"343"}="227"; +$oct{"344"}="228"; +$oct{"345"}="229"; +$oct{"346"}="230"; +$oct{"347"}="231"; +$oct{"350"}="232"; +$oct{"351"}="233"; +$oct{"352"}="234"; +$oct{"353"}="235"; +$oct{"354"}="236"; +$oct{"355"}="237"; +$oct{"356"}="238"; +$oct{"357"}="239"; +$oct{"360"}="240"; +$oct{"361"}="241"; +$oct{"362"}="242"; +$oct{"363"}="243"; +$oct{"364"}="244"; +$oct{"365"}="245"; +$oct{"366"}="246"; +$oct{"367"}="247"; +$oct{"370"}="248"; +$oct{"371"}="249"; +$oct{"372"}="250"; +$oct{"373"}="251"; +$oct{"374"}="252"; +$oct{"375"}="253"; +$oct{"376"}="254"; +$oct{"377"}="255"; +while (<>) { + s/\{\"(..)\}/\{$hex{$1}}\}/; + s/\{\'(..)\}/\{$oct{$1}}\}/; + print; +} diff --git a/fonts/psfonts/tools/psyr.afm b/fonts/psfonts/tools/psyr.afm new file mode 100644 index 0000000000..1cdbdae695 --- /dev/null +++ b/fonts/psfonts/tools/psyr.afm @@ -0,0 +1,209 @@ +StartFontMetrics 2.0 +Comment Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. +Comment Creation Date: Wed Jan 17 21:48:26 1990 +Comment UniqueID 27004 +Comment VMusage 28489 37622 +FontName Symbol +FullName Symbol +FamilyName Symbol +Weight Medium +ItalicAngle 0 +IsFixedPitch false +FontBBox -180 -293 1090 1010 +UnderlinePosition -98 +UnderlineThickness 54 +Version 001.007 +Notice Copyright (c) 1985, 1987, 1989, 1990 Adobe Systems Incorporated. All rights reserved. +EncodingScheme FontSpecific +StartCharMetrics 189 +C 32 ; WX 250 ; N space ; B 0 0 0 0 ; +C 33 ; WX 333 ; N exclam ; B 128 -17 240 672 ; +C 34 ; WX 713 ; N universal ; B 31 0 681 705 ; +C 35 ; WX 500 ; N numbersign ; B 20 -16 481 673 ; +C 36 ; WX 549 ; N existential ; B 25 0 478 707 ; +C 37 ; WX 833 ; N percent ; B 63 -36 771 655 ; +C 38 ; WX 778 ; N ampersand ; B 41 -18 750 661 ; +C 39 ; WX 439 ; N suchthat ; B 48 -17 414 500 ; +C 40 ; WX 333 ; N parenleft ; B 53 -191 300 673 ; +C 41 ; WX 333 ; N parenright ; B 30 -191 277 673 ; +C 42 ; WX 500 ; N asteriskmath ; B 65 134 427 551 ; +C 43 ; WX 549 ; N plus ; B 10 0 539 533 ; +C 44 ; WX 250 ; N comma ; B 56 -152 194 104 ; +C 45 ; WX 549 ; N minus ; B 11 233 535 288 ; +C 46 ; WX 250 ; N period ; B 69 -17 181 95 ; +C 47 ; WX 278 ; N slash ; B 0 -18 254 646 ; +C 48 ; WX 500 ; N zero ; B 23 -17 471 685 ; +C 49 ; WX 500 ; N one ; B 117 0 390 673 ; +C 50 ; WX 500 ; N two ; B 25 0 475 686 ; +C 51 ; WX 500 ; N three ; B 39 -17 435 685 ; +C 52 ; WX 500 ; N four ; B 16 0 469 685 ; +C 53 ; WX 500 ; N five ; B 29 -17 443 685 ; +C 54 ; WX 500 ; N six ; B 36 -17 467 685 ; +C 55 ; WX 500 ; N seven ; B 24 -16 448 673 ; +C 56 ; WX 500 ; N eight ; B 54 -18 440 685 ; +C 57 ; WX 500 ; N nine ; B 31 -18 460 685 ; +C 58 ; WX 278 ; N colon ; B 81 -17 193 460 ; +C 59 ; WX 278 ; N semicolon ; B 83 -152 221 460 ; +C 60 ; WX 549 ; N less ; B 26 0 523 522 ; +C 61 ; WX 549 ; N equal ; B 11 141 537 390 ; +C 62 ; WX 549 ; N greater ; B 26 0 523 522 ; +C 63 ; WX 444 ; N question ; B 70 -17 412 686 ; +C 64 ; WX 549 ; N congruent ; B 11 0 537 475 ; +C 65 ; WX 722 ; N Alpha ; B 4 0 684 673 ; +C 66 ; WX 667 ; N Beta ; B 29 0 592 673 ; +C 67 ; WX 722 ; N Chi ; B -9 0 704 673 ; +C 68 ; WX 612 ; N Delta ; B 6 0 608 688 ; +C 69 ; WX 611 ; N Epsilon ; B 32 0 617 673 ; +C 70 ; WX 763 ; N Phi ; B 26 0 741 673 ; +C 71 ; WX 603 ; N Gamma ; B 24 0 609 673 ; +C 72 ; WX 722 ; N Eta ; B 39 0 729 673 ; +C 73 ; WX 333 ; N Iota ; B 32 0 316 673 ; +C 74 ; WX 631 ; N theta1 ; B 18 -18 623 689 ; +C 75 ; WX 722 ; N Kappa ; B 35 0 722 673 ; +C 76 ; WX 686 ; N Lambda ; B 6 0 680 688 ; +C 77 ; WX 889 ; N Mu ; B 28 0 887 673 ; +C 78 ; WX 722 ; N Nu ; B 29 -8 720 673 ; +C 79 ; WX 722 ; N Omicron ; B 41 -17 715 685 ; +C 80 ; WX 768 ; N Pi ; B 25 0 745 673 ; +C 81 ; WX 741 ; N Theta ; B 41 -17 715 685 ; +C 82 ; WX 556 ; N Rho ; B 28 0 563 673 ; +C 83 ; WX 592 ; N Sigma ; B 5 0 589 673 ; +C 84 ; WX 611 ; N Tau ; B 33 0 607 673 ; +C 85 ; WX 690 ; N Upsilon ; B -8 0 694 673 ; +C 86 ; WX 439 ; N sigma1 ; B 40 -233 436 500 ; +C 87 ; WX 768 ; N Omega ; B 34 0 736 688 ; +C 88 ; WX 645 ; N Xi ; B 40 0 599 673 ; +C 89 ; WX 795 ; N Psi ; B 15 0 781 684 ; +C 90 ; WX 611 ; N Zeta ; B 44 0 636 673 ; +C 91 ; WX 333 ; N bracketleft ; B 86 -155 299 674 ; +C 92 ; WX 863 ; N therefore ; B 163 0 701 478 ; +C 93 ; WX 333 ; N bracketright ; B 33 -155 246 674 ; +C 94 ; WX 658 ; N perpendicular ; B 15 0 652 674 ; +C 95 ; WX 500 ; N underscore ; B -2 -252 502 -206 ; +C 96 ; WX 500 ; N radicalex ; B 480 881 1090 917 ; +C 97 ; WX 631 ; N alpha ; B 41 -18 622 500 ; +C 98 ; WX 549 ; N beta ; B 61 -223 515 741 ; +C 99 ; WX 549 ; N chi ; B 12 -231 522 499 ; +C 100 ; WX 494 ; N delta ; B 40 -19 481 740 ; +C 101 ; WX 439 ; N epsilon ; B 22 -19 427 502 ; +C 102 ; WX 521 ; N phi ; B 27 -224 490 671 ; +C 103 ; WX 411 ; N gamma ; B 5 -225 484 499 ; +C 104 ; WX 603 ; N eta ; B 0 -202 527 514 ; +C 105 ; WX 329 ; N iota ; B 0 -17 301 503 ; +C 106 ; WX 603 ; N phi1 ; B 36 -224 587 499 ; +C 107 ; WX 549 ; N kappa ; B 33 0 558 501 ; +C 108 ; WX 549 ; N lambda ; B 24 -17 548 739 ; +C 109 ; WX 576 ; N mu ; B 33 -223 567 500 ; +C 110 ; WX 521 ; N nu ; B -9 -16 475 507 ; +C 111 ; WX 549 ; N omicron ; B 35 -19 501 499 ; +C 112 ; WX 549 ; N pi ; B 10 -19 530 487 ; +C 113 ; WX 521 ; N theta ; B 43 -17 485 690 ; +C 114 ; WX 549 ; N rho ; B 50 -230 490 499 ; +C 115 ; WX 603 ; N sigma ; B 30 -21 588 500 ; +C 116 ; WX 439 ; N tau ; B 10 -19 418 500 ; +C 117 ; WX 576 ; N upsilon ; B 7 -18 535 507 ; +C 118 ; WX 713 ; N omega1 ; B 12 -18 671 583 ; +C 119 ; WX 686 ; N omega ; B 42 -17 684 500 ; +C 120 ; WX 493 ; N xi ; B 27 -224 469 766 ; +C 121 ; WX 686 ; N psi ; B 12 -228 701 500 ; +C 122 ; WX 494 ; N zeta ; B 60 -225 467 756 ; +C 123 ; WX 480 ; N braceleft ; B 58 -183 397 673 ; +C 124 ; WX 200 ; N bar ; B 65 -177 135 673 ; +C 125 ; WX 480 ; N braceright ; B 79 -183 418 673 ; +C 126 ; WX 549 ; N similar ; B 17 203 529 307 ; +C 161 ; WX 620 ; N Upsilon1 ; B -2 0 610 685 ; +C 162 ; WX 247 ; N minute ; B 27 459 228 735 ; +C 163 ; WX 549 ; N lessequal ; B 29 0 526 639 ; +C 164 ; WX 167 ; N fraction ; B -180 -12 340 677 ; +C 165 ; WX 713 ; N infinity ; B 26 124 688 404 ; +C 166 ; WX 500 ; N florin ; B 2 -193 494 686 ; +C 167 ; WX 753 ; N club ; B 86 -26 660 533 ; +C 168 ; WX 753 ; N diamond ; B 142 -36 600 550 ; +C 169 ; WX 753 ; N heart ; B 117 -33 631 532 ; +C 170 ; WX 753 ; N spade ; B 113 -36 629 548 ; +C 171 ; WX 1042 ; N arrowboth ; B 24 -15 1024 511 ; +C 172 ; WX 987 ; N arrowleft ; B 32 -15 942 511 ; +C 173 ; WX 603 ; N arrowup ; B 45 0 571 910 ; +C 174 ; WX 987 ; N arrowright ; B 49 -15 959 511 ; +C 175 ; WX 603 ; N arrowdown ; B 45 -22 571 888 ; +C 176 ; WX 400 ; N degree ; B 50 385 350 685 ; +C 177 ; WX 549 ; N plusminus ; B 10 0 539 645 ; +C 178 ; WX 411 ; N second ; B 20 459 413 737 ; +C 179 ; WX 549 ; N greaterequal ; B 29 0 526 639 ; +C 180 ; WX 549 ; N multiply ; B 17 8 533 524 ; +C 181 ; WX 713 ; N proportional ; B 27 123 639 404 ; +C 182 ; WX 494 ; N partialdiff ; B 26 -20 462 746 ; +C 183 ; WX 460 ; N bullet ; B 50 113 410 473 ; +C 184 ; WX 549 ; N divide ; B 10 71 536 456 ; +C 185 ; WX 549 ; N notequal ; B 15 -25 540 549 ; +C 186 ; WX 549 ; N equivalence ; B 14 82 538 443 ; +C 187 ; WX 549 ; N approxequal ; B 14 135 527 394 ; +C 188 ; WX 1000 ; N ellipsis ; B 111 -17 889 95 ; +C 189 ; WX 603 ; N arrowvertex ; B 280 -120 336 1010 ; +C 190 ; WX 1000 ; N arrowhorizex ; B -60 220 1050 276 ; +C 191 ; WX 658 ; N carriagereturn ; B 15 -16 602 629 ; +C 192 ; WX 823 ; N aleph ; B 175 -18 661 658 ; +C 193 ; WX 686 ; N Ifraktur ; B 10 -53 578 740 ; +C 194 ; WX 795 ; N Rfraktur ; B 26 -15 759 734 ; +C 195 ; WX 987 ; N weierstrass ; B 159 -211 870 573 ; +C 196 ; WX 768 ; N circlemultiply ; B 43 -17 733 673 ; +C 197 ; WX 768 ; N circleplus ; B 43 -15 733 675 ; +C 198 ; WX 823 ; N emptyset ; B 39 -24 781 719 ; +C 199 ; WX 768 ; N intersection ; B 40 0 732 509 ; +C 200 ; WX 768 ; N union ; B 40 -17 732 492 ; +C 201 ; WX 713 ; N propersuperset ; B 20 0 673 470 ; +C 202 ; WX 713 ; N reflexsuperset ; B 20 -125 673 470 ; +C 203 ; WX 713 ; N notsubset ; B 36 -70 690 540 ; +C 204 ; WX 713 ; N propersubset ; B 37 0 690 470 ; +C 205 ; WX 713 ; N reflexsubset ; B 37 -125 690 470 ; +C 206 ; WX 713 ; N element ; B 45 0 505 468 ; +C 207 ; WX 713 ; N notelement ; B 45 -58 505 555 ; +C 208 ; WX 768 ; N angle ; B 26 0 738 673 ; +C 209 ; WX 713 ; N gradient ; B 36 -19 681 718 ; +C 210 ; WX 790 ; N registerserif ; B 50 -17 740 673 ; +C 211 ; WX 790 ; N copyrightserif ; B 51 -15 741 675 ; +C 212 ; WX 890 ; N trademarkserif ; B 18 293 855 673 ; +C 213 ; WX 823 ; N product ; B 25 -101 803 751 ; +C 214 ; WX 549 ; N radical ; B 10 -38 515 917 ; +C 215 ; WX 250 ; N dotmath ; B 69 210 169 310 ; +C 216 ; WX 713 ; N logicalnot ; B 15 0 680 288 ; +C 217 ; WX 603 ; N logicaland ; B 23 0 583 454 ; +C 218 ; WX 603 ; N logicalor ; B 30 0 578 477 ; +C 219 ; WX 1042 ; N arrowdblboth ; B 27 -20 1023 510 ; +C 220 ; WX 987 ; N arrowdblleft ; B 30 -15 939 513 ; +C 221 ; WX 603 ; N arrowdblup ; B 39 2 567 911 ; +C 222 ; WX 987 ; N arrowdblright ; B 45 -20 954 508 ; +C 223 ; WX 603 ; N arrowdbldown ; B 44 -19 572 890 ; +C 224 ; WX 494 ; N lozenge ; B 18 0 466 745 ; +C 225 ; WX 329 ; N angleleft ; B 25 -198 306 746 ; +C 226 ; WX 790 ; N registersans ; B 50 -20 740 670 ; +C 227 ; WX 790 ; N copyrightsans ; B 49 -15 739 675 ; +C 228 ; WX 786 ; N trademarksans ; B 5 293 725 673 ; +C 229 ; WX 713 ; N summation ; B 14 -108 695 752 ; +C 230 ; WX 384 ; N parenlefttp ; B 40 -293 436 926 ; +C 231 ; WX 384 ; N parenleftex ; B 40 -85 92 925 ; +C 232 ; WX 384 ; N parenleftbt ; B 40 -293 436 926 ; +C 233 ; WX 384 ; N bracketlefttp ; B 0 -80 341 926 ; +C 234 ; WX 384 ; N bracketleftex ; B 0 -79 55 925 ; +C 235 ; WX 384 ; N bracketleftbt ; B 0 -80 340 926 ; +C 236 ; WX 494 ; N bracelefttp ; B 201 -75 439 926 ; +C 237 ; WX 494 ; N braceleftmid ; B 14 -85 255 935 ; +C 238 ; WX 494 ; N braceleftbt ; B 201 -70 439 926 ; +C 239 ; WX 494 ; N braceex ; B 201 -80 255 935 ; +C 241 ; WX 329 ; N angleright ; B 21 -198 302 746 ; +C 242 ; WX 274 ; N integral ; B 2 -107 291 916 ; +C 243 ; WX 686 ; N integraltp ; B 332 -83 715 921 ; +C 244 ; WX 686 ; N integralex ; B 332 -88 415 975 ; +C 245 ; WX 686 ; N integralbt ; B 39 -81 415 921 ; +C 246 ; WX 384 ; N parenrighttp ; B 54 -293 450 926 ; +C 247 ; WX 384 ; N parenrightex ; B 398 -85 450 925 ; +C 248 ; WX 384 ; N parenrightbt ; B 54 -293 450 926 ; +C 249 ; WX 384 ; N bracketrighttp ; B 22 -80 360 926 ; +C 250 ; WX 384 ; N bracketrightex ; B 305 -79 360 925 ; +C 251 ; WX 384 ; N bracketrightbt ; B 20 -80 360 926 ; +C 252 ; WX 494 ; N bracerighttp ; B 17 -75 255 926 ; +C 253 ; WX 494 ; N bracerightmid ; B 201 -85 442 935 ; +C 254 ; WX 494 ; N bracerightbt ; B 17 -70 255 926 ; +C -1 ; WX 790 ; N apple ; B 56 -3 733 808 ; +EndCharMetrics +EndFontMetrics diff --git a/fonts/psfonts/tools/verifycs2 b/fonts/psfonts/tools/verifycs2 new file mode 100644 index 0000000000..6fdcce4113 --- /dev/null +++ b/fonts/psfonts/tools/verifycs2 @@ -0,0 +1,113 @@ +#!/usr/local/bin/perl + +# File: verifycs +# Purpose: Perl script written to check consistency of psfonts on CTAN. +# Adapt definition of TFMPATH to place where default TFM fonts are. +# Author: Piet Tutelaers (rcpt@urc.tue.nl) +# Version: 1.0 (December 1995), 2.0 (January 1997) by S Rahtz +# 3.0 (May 1998) for web2c 7.2 +# +$debug = 0; + +die "Usage: verifycs fontdir\n" unless @ARGV == 1; + +$fontdir = $ARGV[0]; + +die "$fontdir: no such directory\n" unless -r $fontdir; + +$ENV{TFMFONTS}="$fontdir//tfm"; +$ENV{VFFONTS}="$fontdir//vf"; +@tfms = split(/\s+/, `find $fontdir -name "*.tfm" -print`); + +# Loop through TFM files +foreach (@tfms) { + print "Font: $_\n" if $debug; + ($dir, $font) = m#^(.*)/tfm/(.*)\.tfm$#; + if (-r "$dir/vf/$font.vf") { # Virtual font + # Verify checksums + chop($csvf = `cs -o $dir/vf/$font.vf`); + chop($cstfm = `cs -o $dir/tfm/$font.tfm`); + if ("$csvf" ne "$cstfm") { + print "[1] $dir/{vf,tfm}/$font.*: checksum mismatch ($csvf,$cstfm)\n"; + next; + } + + # Now verify fonts referenced in VF file + # We look for information of the form + # (MAPFONT D 0 + # (FONTNAME ptmr8r) + # (FONTCHECKSUM O 24364160751) + # (FONTAT R 1.0) + # (FONTDSIZE R 10.0) + # ) + open(VF, "vftovp $dir/vf/$font.vf $dir/tfm/$font.tfm |"); + while () { + last if (/LIGTABLE/); + if (/MAPFONT/) { + $fontname =""; $checksum = ""; + while () { + ($fontname) = /FONTNAME\s+(\w+)/ if /FONTNAME/; + ($checksum) = /FONTCHECKSUM\s+O\s+(\w+)/ if /FONTCHECKSUM/; + last if /^\s+\)/; + } + if ("$checksum" ne "") { + $tfmfile = `kpsewhich $fontname.tfm 2> /dev/null`; + if ($tfmfile eq "") { + print "[2] $dir/vf/$font.vf: $fontname referenced\n"; + next; + } + chop($cstfm = `cs -o $tfmfile`); + if ("$checksum" ne "$cstfm") { + print "[3] $dir/vf/$font.vf: checksum mismatch $fontname against $tfmfile ", + "($checksum,$cstfm)\n"; + next; + } + next; + } + print "[4]$dir/vf/$font.vf: no checksum for mapfont ($fontname)\n"; + } + } + close(VF); + } + else { # Raw font + @lines = `grep "$font\[^a-z\]" $dir/../*/dvips/*.map 2>/dev/null`; + if (@lines == 0) { + print "[5] No mapping information for $font!\n"; + next; + } + chop($line = $lines[0]); + $line =~ s/^.*://; + print "line = $line\n" if $debug; + ($psname) = ($line =~ /[ *]*\S+\s+(\S+)/); + ($enc) = ($line =~ /^.*<(.*\.enc)/); + ($extend) = ($line =~ /.*[^\d.]([0-9.]+)\s+ExtendFont/); + ($slant) = ($line =~ /.*[^\d.]([0-9.]+)\s+SlantFont/); + + $args = "-n -o "; +if ($enc) +{ +$EncFile=`kpsewhich -format='dvips config' $enc `; +chop($EncFile); + $args .= "-e$EncFile " + } + $args .= "-E$extend " if $extend; + $args .= "-S$slant " if $slant; + $findafm=$font; + $findafm =~ s/8r/8a/; + chop($afm = `kpsewhich $findafm.afm 2> /dev/null`); + if ($afm ne "") + { + print "cs $args $afm\n" if $debug; + $cs = 0; + chop($cs = `cs $args $afm`); + die "cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + + chop($cstfm = `cs -o $dir/tfm/$font.tfm`); + print "[6] $dir/tfm/$font.tfm ($cstfm): checksum incorrect ($cs)\n" + unless "$cstfm" eq "$cs"; + } + else + { print "no AFM file for $font, cannot proceed\n"; } + } +} + diff --git a/fonts/psfonts/tools/verifycs2.pl b/fonts/psfonts/tools/verifycs2.pl new file mode 100644 index 0000000000..7324992f91 --- /dev/null +++ b/fonts/psfonts/tools/verifycs2.pl @@ -0,0 +1,240 @@ +#!/usr/local/bin/perl + +# File: verifycs.pl +# Purpose: Perl script written to check consistency of psfonts on CTAN. +# This 2.1 version should be more robust than its predecessors. +# This program depends upon the UNIX tool `find' to locate TFM +# and AFM files. +# Author: Piet Tutelaers (rcpt@urc.tue.nl) +# Version: 1.0 (December 1995), 2.0 (January 1997) by S Rahtz +# 2.1 (February 1997) Piet Tutelaers +# 2.2 (May 1998) Sebastian Rahtz + +$ENCPATH = "tools//"; + +die "Usage: verifycs AFMpath mapfile fontdir\n" unless @ARGV == 3; + +$afmpath = $ARGV[0]; # path with possible `//' recursion +$mapfile = $ARGV[1]; # just a single filename +$fontdir = $ARGV[2]; # single directory containing TFM and VF fonts + +# Read the $mapfile and find all required AFM files via $afmpath +&read_mapfile($mapfile); +&find_afmfilenames($afmpath); + +# Complain about missing AFM files +foreach (sort (keys %afmfilename)) { + if ($afmfilename{$_} eq "required") { + print "$_: no AFM file\n"; + } +} + +@tfms = split(/\s+/, `find $fontdir -name "*.tfm" -print`); + +# Loop through TFM files in $fontdir +foreach (@tfms) { + $tfmfile = $_; + ($texname) = m#([^/]+)\.tfm$#; + $vffile = &psearch("$fontdir//", "$texname.vf"); + if ($vffile ne "") { # Virtual font + # Verify checksums + chop($csvf = `cs -o $vffile`); + chop($cstfm = `cs -o $tfmfile`); + if ("$csvf" ne "$cstfm") { + print "$tfmfile: CS=$cstfm\n"; + print "$vffile: CS=$csvf\n"; + next; + } + + # Now verify fonts referenced in VF file + # We look for information of the form + # (MAPFONT D 0 + # (FONTNAME ptmr8r) + # (FONTCHECKSUM O 24364160751) + # (FONTAT R 1.0) + # (FONTDSIZE R 10.0) + # ) + open(VF, "vftovp $vffile $tfmfile |"); + while () { + last if (/LIGTABLE/); + if (/MAPFONT/) { + $fontname =""; $checksum = ""; + while () { + ($fontname) = /FONTNAME\s+(\w+)/ if /FONTNAME/; + ($checksum) = /FONTCHECKSUM\s+O\s+(\w+)/ if /FONTCHECKSUM/; + last if /^\s+\)/; + } + if ("$checksum" ne "") { + $tfmfile = &psearch("$fontdir//", "$fontname.tfm"); + if ($tfmfile eq "") { + print "$vffile: $fontname referenced no TFM file found\n"; + next; + } + chop($cstfm = `cs -o $tfmfile`); + if ("$checksum" ne "$cstfm") { + print "$vffile: mapped to $fontname (CS=$csvf)\n"; + print "$vffile: real $fontname.tfm (CS=$cstfm)\n"; + next; + } + next; + } + print "$vffile: mapped to $fontname (missing FONTCHECKSUM)\n"; + last; + } + } + close(VF); + } + else { # Raw font: font mapped to PostScript font + if (!defined $mapping{$texname}) { + warn "$mapfile: no mapping info for $texname\n"; + next; + } + ($psname, $cs_args) = split(/:/, $mapping{$texname}); + if ($afmfilename{$psname} eq "required") { + warn "$psname: no AFM file for $texname\n"; + next; + } + print "cs $cs_args $afmfilename{$psname}\n" if $debug; + $cs = 0; + chop($cs = `cs $cs_args $afmfilename{$psname}`); + die "cs: exit code ", ($? >>8) & 255, "\n" if $cs == 0 && $?; + + chop($cstfm = `cs -o $tfmfile`); + if ("$cstfm" ne "$cs") { + print "$tfmfile: CS=$cstfm\n"; + print "$tfmfile: cs $cs_args $psname.afm ==> $cs\n"; + } + } +} + +# +# Next function returns the name of the file in the path or empty string +# when not available. +# +sub psearch { + local($path, $filename) = @_; + local($file, $subdir, @subdirectories); + local($firstdir, $lastdir); + + # Loop through $path directories to find $filename + foreach (split(/:/, $path)) { + if (! m,//,) { + return "$_/$filename" if -r "$_/$filename"; + } + elsif (m,//$,) { s,//$,,; + return "$_/$filename" if -r "$_/$filename"; + opendir(DIR, $_); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$_/$subdir"; +print "Looking for $filename in $_/$subdir//\n" if $debug; + $file = &psearch("$_/$subdir//", $filename); + return $file unless $file eq ""; + } + } + elsif (m,//,) { + ($firstdir, $lastdir) = m,^(.*)//(.*)$,; + return &psearch("$firstdir/$lastdir", $filename) + if -d "$firstdir/$lastdir"; + opendir(DIR, $firstdir); + @subdirectories=readdir(DIR); + closedir(DIR); + foreach $subdir (@subdirectories) { + next if ($subdir eq '.' || $subdir eq '..'); + next unless -d "$firstdir/$subdir"; +print "Looking for $filename in $firstdir/$subdir//$lastdir\n" if $debug; + $file = &psearch("$firstdir/$subdir//$lastdir", $filename); + return $file unless $file eq ''; + } + } + } + return ""; +} + +# +# Find the absolute AFM-filenames for all PostScript fonts ($psname) +# referenced in the MAPFILE. Store them in %afmfilename{$psname}. +# +sub find_afmfilenames { + local($path) = @_; + local($afmfile, $fontname, $psname, @afms); + + # Loop through $path directories to find all AFM files + select(STDOUT); $| = 1; # flush STDOUT + foreach (split(/:/, $path)) { + if (m,//,) { + s,//.*$,,; + } + if (! -d $_) { + warn "$_: no valid directory name\n"; + next; + } + print "Reading AFM files in $_ ..."; + @afms = split(/\s+/, `find $_ -name "*.afm" -print`); + foreach $afmfile (@afms) { + $fontname = `grep FontName $afmfile 2>/dev/null`; + if ($fontname eq "") { + warn "$afmfile: can't determine FontName\n"; + next; + } + chop($fontname); + ($psname) = ($fontname =~ /FontName\s+(\S+)$/); + + next unless $afmfilename{$psname} eq "required"; + $afmfilename{$psname} = $afmfile; + } + print " done\n"; + } +} + +# Read mapfile to find out +# (a) what TeXnames are used ($texname) +# (b) what PostScript name is used ($psname) +# (b) what CHECKSUM relevant mapping info is provided ($cs_args) +# (c) put this info in %mapping: +# $mapping{$texname} = '$psname:$cs_args' +# (d) trace needed AFM files ($afmfilenames{$psname} = "required") +sub read_mapfile{ + local($mapfile) = @_; + local($texname, $psname, $enc, $extend, $slant); + local(%encoding); + + die "$mapfile: can't read\n" unless -r $mapfile; + open(MAP, "<$mapfile") || die "$mapfile: can't open\n"; + while () { + chop; + next if /^[*%]/ || /^$/; + ($texname, $psname) = /\s?(\S+)\s+(\S+)/; + ($enc) = /^.*<(.*\.enc)/; + ($extend) = /.*[^\d.]([0-9.]+)\s+ExtendFont/; + ($slant) = /.*[^\d.]([0-9.]+)\s+SlantFont/; + if (defined $mapping{$texname}) { + warn "$mapfile: $texname already defined (this one skipped)\n"; + next; + } + else { + $cs_args = "-n -o "; + if (!defined $encoding{$enc}) { + $encfile = &psearch($ENCPATH, $enc); + if ($encfile eq "") { + warn "$enc: no such encoding file found\n"; + next; + } + $encoding{$enc} = $encfile; + } + else { + $encfile = $encoding{$enc}; + } + $cs_args .= "-e$encfile " if $enc; + $cs_args .= "-E$extend " if $extend; + $cs_args .= "-S$slant " if $slant; + $mapping{$texname} = "$psname:$cs_args"; + $afmfilename{$psname} = "required"; + } + } + close(MAP); +} + + diff --git a/fonts/psfonts/tools/vptovf.ch b/fonts/psfonts/tools/vptovf.ch new file mode 100644 index 0000000000..3a6853865f --- /dev/null +++ b/fonts/psfonts/tools/vptovf.ch @@ -0,0 +1,325 @@ +% vptovf.ch for C compilation with web2c. + + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [0] WEAVE: print changes only. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +\pageno=\contentspagenumber \advance\pageno by 1 +@y +\pageno=\contentspagenumber \advance\pageno by 1 +\let\maybe=\iffalse +\def\title{VP$\,$\lowercase{to}$\,$VF changes for C} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [1] Change banner string. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d banner=='This is VPtoVF, Version 1.4' {printed when the program starts} +@y +@d banner=='This is VPtoVF, Version 1.4' {more is printed later} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [2] Remove filenames from program statement, and print the banner later. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p program VPtoVF(@!vpl_file,@!vf_file,@!tfm_file,@!output); +@y +@p program VPtoVF; +@z + +@x + begin print_ln(banner);@/ +@y + begin +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% increase max. ligtable size: +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@!max_lig_steps=5000; + {maximum length of ligature program, must be at most $32767-257=32510$} +@!max_kerns=500; {the maximum number of distinct kern values} +@!hash_size=5003; {preferably a prime number, a bit larger than the number + of character pairs in lig/kern steps} +@y +@!max_lig_steps=32000; + {maximum length of ligature program, must be at most $32767-257=32510$} +@!max_kerns=15000; {the maximum number of distinct kern values} +@!hash_size=15077; {preferably a prime number, a bit larger than the number + of character pairs in lig/kern steps} +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [6] Open VPL file. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +reset(vpl_file); +@y +if (argc < 4) or (argc > n_options + 4) +then begin + print_ln ('Usage: vptovf [-verbose] .'); + uexit (1); +end; +@; +@; +argv (optind, vpl_name); +reset (vpl_file, vpl_name); +if verbose then begin + print (banner); + print_ln (banner); +end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [21] Declare filename variables. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@!tfm_file:packed file of 0..255; +@y +@!tfm_file:packed file of 0..255; +@!vf_name,@!tfm_name,@!vpl_name:packed array[1..PATH_MAX] of char; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [22] Open output files. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@ On some systems you may have to do something special to write a +packed file of bytes. For example, the following code didn't work +when it was first tried at Stanford, because packed files have to be +opened with a special switch setting on the \PASCAL\ that was used. +@^system dependencies@> + +@= +rewrite(vf_file); rewrite(tfm_file); +@y +@ On some systems you may have to do something special to write a +packed file of bytes. +@^system dependencies@> + +@= +argv(optind + 1, vf_name); +rewrite(vf_file, vf_name); +argv(optind + 2, tfm_name); +rewrite(tfm_file, tfm_name); +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [89] `index' is not a good choice for an identifier on Unix systems. +% Neither is `class', on AIX. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +|k|th element of its list. + +@= +@!index:array[pointer] of byte; +@y +|k|th element of its list. + +@d index == index_var +@d class == class_var + +@= +@!index:array[pointer] of byte; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [118] No output unless verbose. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@; +@y +if verbose then @; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [144] Output of real numbers. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@ @d round_message(#)==if delta>0 then print_ln('I had to round some ', +@.I had to round...@> + #,'s by ',(((delta+1) div 2)/@'4000000):1:7,' units.') +@y +@ @d round_message(#)==if delta>0 then begin print('I had to round some ', +@.I had to round...@> + #,'s by '); print_real((((delta+1) div 2)/@'4000000),1,7); + print_ln(' units.'); end +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [152] Fix up the mutually recursive procedures a la pltotf. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p function f(@!h,@!x,@!y:indx):indx; forward;@t\2@> + {compute $f$ for arguments known to be in |hash[h]|} +@y +@p +ifdef('notdef') +function f(@!h,@!x,@!y:indx):indx; begin end;@t\2@> + {compute $f$ for arguments known to be in |hash[h]|} +endif('notdef') +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [153] Finish fixing up f. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p function f; +@y +@p function f(@!h,@!x,@!y:indx):indx; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [156] Change TFM-byte output to fix ranges. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d out(#)==write(tfm_file,#) +@y +@d out(#)==putbyte(#,tfm_file) +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [165] Fix output of reals. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@p procedure out_scaled(x:fix_word); {outputs a scaled |fix_word|} +var @!n:byte; {the first byte after the sign} +@!m:0..65535; {the two least significant bytes} +begin if abs(x/design_units)>=16.0 then + begin print_ln('The relative dimension ',x/@'4000000:1:3, + ' is too large.'); +@.The relative dimension...@> + print(' (Must be less than 16*designsize'); + if design_units<>unity then print(' =',design_units/@'200000:1:3, + ' designunits'); +@y +@p procedure out_scaled(x:fix_word); {outputs a scaled |fix_word|} +var @!n:byte; {the first byte after the sign} +@!m:0..65535; {the two least significant bytes} +begin if fabs(x/design_units)>=16.0 then + begin print('The relative dimension '); + print_real(x/@'4000000,1,3); + print_ln(' is too large.'); +@.The relative dimension...@> + print(' (Must be less than 16*designsize'); + if design_units<>unity then begin print(' ='); + print_real(design_units/@'200000,1,3); + print(' designunits'); + end; +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [141] char_remainder[c] is unsigned, and label_table[sort_ptr].rr +% might be -1, and if -1 is coerced to being unsigned, it will be bigger +% than anything else. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x + while label_table[sort_ptr].rr>char_remainder[c] do +@y + while label_table[sort_ptr].rr>toint(char_remainder[c]) do +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [175] Change VF-byte output to fix ranges. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@d vout(#)==write(vf_file,#) +@y +@d vout(#)==putbyte(#,vf_file) +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [181] Be quiet unless verbose. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +read_input; print_ln('.');@/ +@y +read_input; +if verbose then print_ln('.'); +@z + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% [182] System-dependent changes. +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +@x +@* System-dependent changes. +This section should be replaced, if necessary, by changes to the program +that are necessary to make \.{VPtoVF} work at a particular installation. +It is usually best to design your change file so that all changes to +previous sections preserve the section numbering; then everybody's version +will be consistent with the printed program. More extensive changes, +which introduce new sections, can be inserted here; then only the index +itself will get a new section number. +@^system dependencies@> +@y +@* System-dependent changes. We want to parse a Unix-style command line. + +@ = +begin + @; + repeat + getopt_return_val := getopt_long_only (argc, gargv, '', long_options, + address_of_int (option_index)); + if getopt_return_val <> -1 + then begin + if getopt_return_val = "?" + then uexit (1); {|getopt| has already given an error message.} + {We don't have any non-flag options.} + end; + until getopt_return_val = -1; + + {Now |optind| is the index of first non-option on the command line.} +end + + +@ The array of information we pass in. The type |getopt_struct| is +defined in C, to avoid type clashes. We also need to know the return +value from getopt, and the index of the current option. + +@ = +@!long_options: array[0..n_options] of getopt_struct; +@!getopt_return_val: integer; +@!option_index: c_int_type; + + +@ Here are the options we allow. + +@ = +long_options[0].name := 'verbose'; +long_options[0].has_arg := 0; +long_options[0].flag := address_of_int (verbose); +long_options[0].val := 1; + + +@ The global variable |verbose| determines whether or not we print +progress information. + +@ = +@!verbose: c_int_type; + +@ It starts off |false|. + +@ = +verbose := false; + + +@ An element with all zeros always ends the list. + +@ = +long_options[1].name := 0; +long_options[1].has_arg := 0; +long_options[1].flag := 0; +long_options[1].val := 0; + + +@ Pascal compilers won't count the number of elements in an array +constant for us. This doesn't include the zero-element at the end, +because this array starts at index zero. + +@ = +n_options = 1; +@z -- cgit v1.2.3