summaryrefslogtreecommitdiff
path: root/Master/texmf-dist/doc/generic/t2/make-enc.pl
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2006-01-09 00:59:05 +0000
committerKarl Berry <karl@freefriends.org>2006-01-09 00:59:05 +0000
commitd4f912523bae12ffe3cd9cf564cfc7a29567ef4c (patch)
tree856e4a34ef140d96b221be61207fc52ccac58471 /Master/texmf-dist/doc/generic/t2/make-enc.pl
parentf07bb53970ee2ecc53f81a206a3d3a67ef665e4a (diff)
doc 7
git-svn-id: svn://tug.org/texlive/trunk@86 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/doc/generic/t2/make-enc.pl')
-rw-r--r--Master/texmf-dist/doc/generic/t2/make-enc.pl48
1 files changed, 48 insertions, 0 deletions
diff --git a/Master/texmf-dist/doc/generic/t2/make-enc.pl b/Master/texmf-dist/doc/generic/t2/make-enc.pl
new file mode 100644
index 00000000000..8e141a2bb6b
--- /dev/null
+++ b/Master/texmf-dist/doc/generic/t2/make-enc.pl
@@ -0,0 +1,48 @@
+#!/usr/bin/perl
+
+$enc2uni=$ARGV[0];
+$encname=$ARGV[1];
+shift;shift;
+$glyph2uni=join("', `",@ARGV);
+
+while(<>) {
+ if ($_ =~ /^#/) { next }
+ s/(....);([^;]*);/$glyphenc{$1}=$2/e;
+}
+
+print <<"ENDHEADER";
+% This file is generated from `$enc2uni' and `$glyph2uni'
+%
+% LIGKERN hyphen hyphen =: endash ; endash hyphen =: emdash ;
+% LIGKERN quoteleft quoteleft =: quotedblleft ;
+% LIGKERN quoteright quoteright =: quotedblright ;
+% LIGKERN comma comma =: quotedblbase ; less less =: guillemotleft ;
+% LIGKERN greater greater =: guillemotright ;
+% LIGKERN f f =: ff ; f i =: fi ; f l =: fl ; ff i =: ffi ; ff l =: ffl ;
+%
+% LIGKERN space {} * ; * {} space ; zero {} * ; * {} zero ;
+% LIGKERN one {} * ; * {} one ; two {} * ; * {} two ;
+% LIGKERN three {} * ; * {} three ; four {} * ; * {} four ;
+% LIGKERN five {} * ; * {} five ; six {} * ; * {} six ;
+% LIGKERN seven {} * ; * {} seven ; eight {} * ; * {} eight ;
+% LIGKERN nine {} * ; * {} nine ;
+%
+/${encname}Encoding [
+ENDHEADER
+
+$n=0;
+open(ENC2UNI,$enc2uni);
+while(<ENC2UNI>) {
+ if ($_ =~ /^#/) { next }
+ s/(..);([^;]*);/$codeenc=$1;$codeuni=$2/e;
+ if ($n % 16 == 0) { printf "%% 0x%02X\n",$n }
+ $n++;
+ if ($glyphenc{$codeuni} ne "") {
+ print "/$glyphenc{$codeuni}\n";
+ } else {
+ print "/.notdef\n";
+ }
+}
+close(ENC2UNI);
+
+print "] def\n";