ter-u14b.bdf: fix O+. and o+.
[terpinus.git] / hex2bin.pl
blob670afdad74da53d5ea42ce4b0d061905473ea2de
1 #!/usr/bin/perl
3 %names = (
4 'Aacute' => 'A\'',
5 'aacute' => 'a\'',
6 'Agrave' => 'A`',
7 'agrave' => 'a`',
8 'uni1EA2' => 'A?',
9 'uni1EA3' => 'a?',
10 'Atilde' => 'A~',
11 'atilde' => 'a~',
12 'uni1EA0' => 'A.',
13 'uni1EA1' => 'a.',
15 'Acircumflex' => 'A^',
16 'acircumflex' => 'a^',
18 'uni1EA4' => 'A^\'',
19 'uni1EA5' => 'a^\'',
20 'uni1EA6' => 'A^`',
21 'uni1EA7' => 'a^`',
22 'uni1EA8' => 'A^?',
23 'uni1EA9' => 'a^?',
24 'uni1EAA' => 'A^~',
25 'uni1EAB' => 'a^~',
26 'uni1EAC' => 'A^.',
27 'uni1EAD' => 'a^.',
29 'Abreve' => 'A(',
30 'abreve' => 'a(',
32 'uni1EAE' => 'A(\'',
33 'uni1EAF' => 'a(\'',
34 'uni1EB0' => 'A(`',
35 'uni1EB1' => 'a(`',
36 'uni1EB2' => 'A(?',
37 'uni1EB3' => 'a(?',
38 'uni1EB4' => 'A(~',
39 'uni1EB5' => 'a(~',
40 'uni1EB6' => 'A(.',
41 'uni1EB7' => 'a(.',
43 'Eacute' => 'E\'',
44 'eacute' => 'e\'',
45 'Egrave' => 'E`',
46 'egrave' => 'e`',
47 'uni1EBA' => 'E?',
48 'uni1EBB' => 'e?',
49 'Etilde' => 'E~',
50 'etilde' => 'e~',
51 'Edotbelow' => 'E.',
52 'edotbelow' => 'e.',
54 'Ecircumflex' => 'E^',
55 'ecircumflex' => 'e^',
57 'uni1EBE' => 'E^\'',
58 'uni1EBF' => 'e^\'',
59 'uni1EC0' => 'E^`',
60 'uni1EC1' => 'e^`',
61 'uni1EC2' => 'E^?',
62 'uni1EC3' => 'e^?',
63 'uni1EC4' => 'E^~',
64 'uni1EC5' => 'e^~',
65 'uni1EC6' => 'E^.',
66 'uni1EC7' => 'e^.',
68 'Iacute' => 'I\'',
69 'iacute' => 'i\'',
70 'Igrave' => 'I`',
71 'igrave' => 'i`',
72 'uni1EC8' => 'I?',
73 'uni1EC9' => 'i?',
74 'Itilde' => 'I~',
75 'itilde' => 'i~',
76 'uni1ECA' => 'I.',
77 'uni1ECB' => 'i.',
79 'Oacute' => 'O\'',
80 'oacute' => 'o\'',
81 'Ograve' => 'O`',
82 'ograve' => 'o`',
83 'uni1ECE' => 'O?',
84 'uni1ECF' => 'o?',
85 'Otilde' => 'O~',
86 'otilde' => 'o~',
87 'Odotbelow' => 'O.',
88 'odotbelow' => 'o.',
90 'Ocircumflex' => 'O^',
91 'ocircumflex' => 'o^',
93 'uni1ED0' => 'O^\'',
94 'uni1ED1' => 'o^\'',
95 'uni1ED2' => 'O^`',
96 'uni1ED3' => 'o^`',
97 'uni1ED4' => 'O^?',
98 'uni1ED5' => 'o^?',
99 'uni1ED6' => 'O^~',
100 'uni1ED7' => 'o^~',
101 'uni1ED8' => 'O^.',
102 'uni1ED9' => 'o^.',
104 'Ohorn' => 'O+',
105 'ohorn' => 'o+',
107 'uni1EDA' => 'O+\'',
108 'uni1EDB' => 'o+\'',
109 'uni1EDC' => 'O+`',
110 'uni1EDD' => 'o+`',
111 'uni1EDE' => 'O+?',
112 'uni1EDF' => 'o+?',
113 'uni1EE0' => 'O+~',
114 'uni1EE1' => 'o+~',
115 'uni1EE2' => 'O+.',
116 'uni1EE3' => 'o+.',
118 'Uacute' => 'U\'',
119 'uacute' => 'u\'',
120 'Ugrave' => 'U`',
121 'ugrave' => 'u`',
122 'uni1EE6' => 'U?',
123 'uni1EE7' => 'u?',
124 'Utilde' => 'U~',
125 'utilde' => 'u~',
126 'uni1EE4' => 'U.',
127 'uni1EE5' => 'u.',
129 'Uhorn' => 'U+',
130 'uhorn' => 'u+',
132 'uni1EE8' => 'U+\'',
133 'uni1EE9' => 'u+\'',
134 'uni1EEA' => 'U+`',
135 'uni1EEB' => 'u+`',
136 'uni1EEC' => 'U+?',
137 'uni1EED' => 'u+?',
138 'uni1EEE' => 'U+~',
139 'uni1EEF' => 'u+~',
140 'uni1EF0' => 'U+.',
141 'uni1EF1' => 'u+.',
143 'Yacute' => 'Y\'',
144 'yacute' => 'y\'',
145 'Ygrave' => 'Y`',
146 'ygrave' => 'y`',
147 'uni1EF6' => 'Y?',
148 'uni1EF7' => 'y?',
149 'Ytilde' => 'Y~',
150 'ytilde' => 'y~',
151 'uni1EF4' => 'Y.',
152 'uni1EF5' => 'y.',
154 'Dcroat' => 'DD',
155 'dcroat' => 'dd',
158 while (<>) {
159 if (m/^([0-9A-F]+)$/) {
160 $full = $&;
161 $t = $1;
162 $t =~ s/0/......../g;
163 $t =~ s/1/......##/g;
164 $t =~ s/2/....##../g;
165 $t =~ s/3/....####/g;
166 $t =~ s/4/..##..../g;
167 $t =~ s/5/..##..##/g;
168 $t =~ s/6/..####../g;
169 $t =~ s/7/..######/g;
170 $t =~ s/8/##....../g;
171 $t =~ s/9/##....##/g;
172 $t =~ s/A/##..##../g;
173 $t =~ s/B/##..####/g;
174 $t =~ s/C/####..../g;
175 $t =~ s/D/####..##/g;
176 $t =~ s/E/######../g;
177 $t =~ s/F/########/g;
178 print "$full\t$t\n";
180 elsif (m/^STARTCHAR (.*)/ && defined($names{$1})) {
181 print "STARTCHAR $names{$1}\n";
183 else {
184 print $_;