1
2
3 package width
4
5 var mapRunes = map[rune]struct {
6 r rune
7 e elem
8 }{
9 0x20: {0x3000, 0x6000},
10 0x21: {0xFF01, 0x6000},
11 0x22: {0xFF02, 0x6000},
12 0x23: {0xFF03, 0x6000},
13 0x24: {0xFF04, 0x6000},
14 0x25: {0xFF05, 0x6000},
15 0x26: {0xFF06, 0x6000},
16 0x27: {0xFF07, 0x6000},
17 0x28: {0xFF08, 0x6000},
18 0x29: {0xFF09, 0x6000},
19 0x2A: {0xFF0A, 0x6000},
20 0x2B: {0xFF0B, 0x6000},
21 0x2C: {0xFF0C, 0x6000},
22 0x2D: {0xFF0D, 0x6000},
23 0x2E: {0xFF0E, 0x6000},
24 0x2F: {0xFF0F, 0x6000},
25 0x30: {0xFF10, 0x6000},
26 0x31: {0xFF11, 0x6000},
27 0x32: {0xFF12, 0x6000},
28 0x33: {0xFF13, 0x6000},
29 0x34: {0xFF14, 0x6000},
30 0x35: {0xFF15, 0x6000},
31 0x36: {0xFF16, 0x6000},
32 0x37: {0xFF17, 0x6000},
33 0x38: {0xFF18, 0x6000},
34 0x39: {0xFF19, 0x6000},
35 0x3A: {0xFF1A, 0x6000},
36 0x3B: {0xFF1B, 0x6000},
37 0x3C: {0xFF1C, 0x6000},
38 0x3D: {0xFF1D, 0x6000},
39 0x3E: {0xFF1E, 0x6000},
40 0x3F: {0xFF1F, 0x6000},
41 0x40: {0xFF20, 0x6000},
42 0x41: {0xFF21, 0x6000},
43 0x42: {0xFF22, 0x6000},
44 0x43: {0xFF23, 0x6000},
45 0x44: {0xFF24, 0x6000},
46 0x45: {0xFF25, 0x6000},
47 0x46: {0xFF26, 0x6000},
48 0x47: {0xFF27, 0x6000},
49 0x48: {0xFF28, 0x6000},
50 0x49: {0xFF29, 0x6000},
51 0x4A: {0xFF2A, 0x6000},
52 0x4B: {0xFF2B, 0x6000},
53 0x4C: {0xFF2C, 0x6000},
54 0x4D: {0xFF2D, 0x6000},
55 0x4E: {0xFF2E, 0x6000},
56 0x4F: {0xFF2F, 0x6000},
57 0x50: {0xFF30, 0x6000},
58 0x51: {0xFF31, 0x6000},
59 0x52: {0xFF32, 0x6000},
60 0x53: {0xFF33, 0x6000},
61 0x54: {0xFF34, 0x6000},
62 0x55: {0xFF35, 0x6000},
63 0x56: {0xFF36, 0x6000},
64 0x57: {0xFF37, 0x6000},
65 0x58: {0xFF38, 0x6000},
66 0x59: {0xFF39, 0x6000},
67 0x5A: {0xFF3A, 0x6000},
68 0x5B: {0xFF3B, 0x6000},
69 0x5C: {0xFF3C, 0x6000},
70 0x5D: {0xFF3D, 0x6000},
71 0x5E: {0xFF3E, 0x6000},
72 0x5F: {0xFF3F, 0x6000},
73 0x60: {0xFF40, 0x6000},
74 0x61: {0xFF41, 0x6000},
75 0x62: {0xFF42, 0x6000},
76 0x63: {0xFF43, 0x6000},
77 0x64: {0xFF44, 0x6000},
78 0x65: {0xFF45, 0x6000},
79 0x66: {0xFF46, 0x6000},
80 0x67: {0xFF47, 0x6000},
81 0x68: {0xFF48, 0x6000},
82 0x69: {0xFF49, 0x6000},
83 0x6A: {0xFF4A, 0x6000},
84 0x6B: {0xFF4B, 0x6000},
85 0x6C: {0xFF4C, 0x6000},
86 0x6D: {0xFF4D, 0x6000},
87 0x6E: {0xFF4E, 0x6000},
88 0x6F: {0xFF4F, 0x6000},
89 0x70: {0xFF50, 0x6000},
90 0x71: {0xFF51, 0x6000},
91 0x72: {0xFF52, 0x6000},
92 0x73: {0xFF53, 0x6000},
93 0x74: {0xFF54, 0x6000},
94 0x75: {0xFF55, 0x6000},
95 0x76: {0xFF56, 0x6000},
96 0x77: {0xFF57, 0x6000},
97 0x78: {0xFF58, 0x6000},
98 0x79: {0xFF59, 0x6000},
99 0x7A: {0xFF5A, 0x6000},
100 0x7B: {0xFF5B, 0x6000},
101 0x7C: {0xFF5C, 0x6000},
102 0x7D: {0xFF5D, 0x6000},
103 0x7E: {0xFF5E, 0x6000},
104 0xA2: {0xFFE0, 0x6000},
105 0xA3: {0xFFE1, 0x6000},
106 0xA5: {0xFFE5, 0x6000},
107 0xA6: {0xFFE4, 0x6000},
108 0xAC: {0xFFE2, 0x6000},
109 0xAF: {0xFFE3, 0x6000},
110 0x20A9: {0xFFE6, 0xA000},
111 0x2190: {0xFFE9, 0x2000},
112 0x2191: {0xFFEA, 0x2000},
113 0x2192: {0xFFEB, 0x2000},
114 0x2193: {0xFFEC, 0x2000},
115 0x2502: {0xFFE8, 0x2000},
116 0x25A0: {0xFFED, 0x2000},
117 0x25CB: {0xFFEE, 0x2000},
118 0x2985: {0xFF5F, 0x6000},
119 0x2986: {0xFF60, 0x6000},
120 0x3000: {0x20, 0x9000},
121 0x3001: {0xFF64, 0x4000},
122 0x3002: {0xFF61, 0x4000},
123 0x300C: {0xFF62, 0x4000},
124 0x300D: {0xFF63, 0x4000},
125 0x3099: {0xFF9E, 0x4000},
126 0x309A: {0xFF9F, 0x4000},
127 0x30A1: {0xFF67, 0x4000},
128 0x30A2: {0xFF71, 0x4000},
129 0x30A3: {0xFF68, 0x4000},
130 0x30A4: {0xFF72, 0x4000},
131 0x30A5: {0xFF69, 0x4000},
132 0x30A6: {0xFF73, 0x4000},
133 0x30A7: {0xFF6A, 0x4000},
134 0x30A8: {0xFF74, 0x4000},
135 0x30A9: {0xFF6B, 0x4000},
136 0x30AA: {0xFF75, 0x4000},
137 0x30AB: {0xFF76, 0x4000},
138 0x30AD: {0xFF77, 0x4000},
139 0x30AF: {0xFF78, 0x4000},
140 0x30B1: {0xFF79, 0x4000},
141 0x30B3: {0xFF7A, 0x4000},
142 0x30B5: {0xFF7B, 0x4000},
143 0x30B7: {0xFF7C, 0x4000},
144 0x30B9: {0xFF7D, 0x4000},
145 0x30BB: {0xFF7E, 0x4000},
146 0x30BD: {0xFF7F, 0x4000},
147 0x30BF: {0xFF80, 0x4000},
148 0x30C1: {0xFF81, 0x4000},
149 0x30C3: {0xFF6F, 0x4000},
150 0x30C4: {0xFF82, 0x4000},
151 0x30C6: {0xFF83, 0x4000},
152 0x30C8: {0xFF84, 0x4000},
153 0x30CA: {0xFF85, 0x4000},
154 0x30CB: {0xFF86, 0x4000},
155 0x30CC: {0xFF87, 0x4000},
156 0x30CD: {0xFF88, 0x4000},
157 0x30CE: {0xFF89, 0x4000},
158 0x30CF: {0xFF8A, 0x4000},
159 0x30D2: {0xFF8B, 0x4000},
160 0x30D5: {0xFF8C, 0x4000},
161 0x30D8: {0xFF8D, 0x4000},
162 0x30DB: {0xFF8E, 0x4000},
163 0x30DE: {0xFF8F, 0x4000},
164 0x30DF: {0xFF90, 0x4000},
165 0x30E0: {0xFF91, 0x4000},
166 0x30E1: {0xFF92, 0x4000},
167 0x30E2: {0xFF93, 0x4000},
168 0x30E3: {0xFF6C, 0x4000},
169 0x30E4: {0xFF94, 0x4000},
170 0x30E5: {0xFF6D, 0x4000},
171 0x30E6: {0xFF95, 0x4000},
172 0x30E7: {0xFF6E, 0x4000},
173 0x30E8: {0xFF96, 0x4000},
174 0x30E9: {0xFF97, 0x4000},
175 0x30EA: {0xFF98, 0x4000},
176 0x30EB: {0xFF99, 0x4000},
177 0x30EC: {0xFF9A, 0x4000},
178 0x30ED: {0xFF9B, 0x4000},
179 0x30EF: {0xFF9C, 0x4000},
180 0x30F2: {0xFF66, 0x4000},
181 0x30F3: {0xFF9D, 0x4000},
182 0x30FB: {0xFF65, 0x4000},
183 0x30FC: {0xFF70, 0x4000},
184 0x3131: {0xFFA1, 0x4000},
185 0x3132: {0xFFA2, 0x4000},
186 0x3133: {0xFFA3, 0x4000},
187 0x3134: {0xFFA4, 0x4000},
188 0x3135: {0xFFA5, 0x4000},
189 0x3136: {0xFFA6, 0x4000},
190 0x3137: {0xFFA7, 0x4000},
191 0x3138: {0xFFA8, 0x4000},
192 0x3139: {0xFFA9, 0x4000},
193 0x313A: {0xFFAA, 0x4000},
194 0x313B: {0xFFAB, 0x4000},
195 0x313C: {0xFFAC, 0x4000},
196 0x313D: {0xFFAD, 0x4000},
197 0x313E: {0xFFAE, 0x4000},
198 0x313F: {0xFFAF, 0x4000},
199 0x3140: {0xFFB0, 0x4000},
200 0x3141: {0xFFB1, 0x4000},
201 0x3142: {0xFFB2, 0x4000},
202 0x3143: {0xFFB3, 0x4000},
203 0x3144: {0xFFB4, 0x4000},
204 0x3145: {0xFFB5, 0x4000},
205 0x3146: {0xFFB6, 0x4000},
206 0x3147: {0xFFB7, 0x4000},
207 0x3148: {0xFFB8, 0x4000},
208 0x3149: {0xFFB9, 0x4000},
209 0x314A: {0xFFBA, 0x4000},
210 0x314B: {0xFFBB, 0x4000},
211 0x314C: {0xFFBC, 0x4000},
212 0x314D: {0xFFBD, 0x4000},
213 0x314E: {0xFFBE, 0x4000},
214 0x314F: {0xFFC2, 0x4000},
215 0x3150: {0xFFC3, 0x4000},
216 0x3151: {0xFFC4, 0x4000},
217 0x3152: {0xFFC5, 0x4000},
218 0x3153: {0xFFC6, 0x4000},
219 0x3154: {0xFFC7, 0x4000},
220 0x3155: {0xFFCA, 0x4000},
221 0x3156: {0xFFCB, 0x4000},
222 0x3157: {0xFFCC, 0x4000},
223 0x3158: {0xFFCD, 0x4000},
224 0x3159: {0xFFCE, 0x4000},
225 0x315A: {0xFFCF, 0x4000},
226 0x315B: {0xFFD2, 0x4000},
227 0x315C: {0xFFD3, 0x4000},
228 0x315D: {0xFFD4, 0x4000},
229 0x315E: {0xFFD5, 0x4000},
230 0x315F: {0xFFD6, 0x4000},
231 0x3160: {0xFFD7, 0x4000},
232 0x3161: {0xFFDA, 0x4000},
233 0x3162: {0xFFDB, 0x4000},
234 0x3163: {0xFFDC, 0x4000},
235 0x3164: {0xFFA0, 0x4000},
236 0xFF01: {0x21, 0x9000},
237 0xFF02: {0x22, 0x9000},
238 0xFF03: {0x23, 0x9000},
239 0xFF04: {0x24, 0x9000},
240 0xFF05: {0x25, 0x9000},
241 0xFF06: {0x26, 0x9000},
242 0xFF07: {0x27, 0x9000},
243 0xFF08: {0x28, 0x9000},
244 0xFF09: {0x29, 0x9000},
245 0xFF0A: {0x2A, 0x9000},
246 0xFF0B: {0x2B, 0x9000},
247 0xFF0C: {0x2C, 0x9000},
248 0xFF0D: {0x2D, 0x9000},
249 0xFF0E: {0x2E, 0x9000},
250 0xFF0F: {0x2F, 0x9000},
251 0xFF10: {0x30, 0x9000},
252 0xFF11: {0x31, 0x9000},
253 0xFF12: {0x32, 0x9000},
254 0xFF13: {0x33, 0x9000},
255 0xFF14: {0x34, 0x9000},
256 0xFF15: {0x35, 0x9000},
257 0xFF16: {0x36, 0x9000},
258 0xFF17: {0x37, 0x9000},
259 0xFF18: {0x38, 0x9000},
260 0xFF19: {0x39, 0x9000},
261 0xFF1A: {0x3A, 0x9000},
262 0xFF1B: {0x3B, 0x9000},
263 0xFF1C: {0x3C, 0x9000},
264 0xFF1D: {0x3D, 0x9000},
265 0xFF1E: {0x3E, 0x9000},
266 0xFF1F: {0x3F, 0x9000},
267 0xFF20: {0x40, 0x9000},
268 0xFF21: {0x41, 0x9000},
269 0xFF22: {0x42, 0x9000},
270 0xFF23: {0x43, 0x9000},
271 0xFF24: {0x44, 0x9000},
272 0xFF25: {0x45, 0x9000},
273 0xFF26: {0x46, 0x9000},
274 0xFF27: {0x47, 0x9000},
275 0xFF28: {0x48, 0x9000},
276 0xFF29: {0x49, 0x9000},
277 0xFF2A: {0x4A, 0x9000},
278 0xFF2B: {0x4B, 0x9000},
279 0xFF2C: {0x4C, 0x9000},
280 0xFF2D: {0x4D, 0x9000},
281 0xFF2E: {0x4E, 0x9000},
282 0xFF2F: {0x4F, 0x9000},
283 0xFF30: {0x50, 0x9000},
284 0xFF31: {0x51, 0x9000},
285 0xFF32: {0x52, 0x9000},
286 0xFF33: {0x53, 0x9000},
287 0xFF34: {0x54, 0x9000},
288 0xFF35: {0x55, 0x9000},
289 0xFF36: {0x56, 0x9000},
290 0xFF37: {0x57, 0x9000},
291 0xFF38: {0x58, 0x9000},
292 0xFF39: {0x59, 0x9000},
293 0xFF3A: {0x5A, 0x9000},
294 0xFF3B: {0x5B, 0x9000},
295 0xFF3C: {0x5C, 0x9000},
296 0xFF3D: {0x5D, 0x9000},
297 0xFF3E: {0x5E, 0x9000},
298 0xFF3F: {0x5F, 0x9000},
299 0xFF40: {0x60, 0x9000},
300 0xFF41: {0x61, 0x9000},
301 0xFF42: {0x62, 0x9000},
302 0xFF43: {0x63, 0x9000},
303 0xFF44: {0x64, 0x9000},
304 0xFF45: {0x65, 0x9000},
305 0xFF46: {0x66, 0x9000},
306 0xFF47: {0x67, 0x9000},
307 0xFF48: {0x68, 0x9000},
308 0xFF49: {0x69, 0x9000},
309 0xFF4A: {0x6A, 0x9000},
310 0xFF4B: {0x6B, 0x9000},
311 0xFF4C: {0x6C, 0x9000},
312 0xFF4D: {0x6D, 0x9000},
313 0xFF4E: {0x6E, 0x9000},
314 0xFF4F: {0x6F, 0x9000},
315 0xFF50: {0x70, 0x9000},
316 0xFF51: {0x71, 0x9000},
317 0xFF52: {0x72, 0x9000},
318 0xFF53: {0x73, 0x9000},
319 0xFF54: {0x74, 0x9000},
320 0xFF55: {0x75, 0x9000},
321 0xFF56: {0x76, 0x9000},
322 0xFF57: {0x77, 0x9000},
323 0xFF58: {0x78, 0x9000},
324 0xFF59: {0x79, 0x9000},
325 0xFF5A: {0x7A, 0x9000},
326 0xFF5B: {0x7B, 0x9000},
327 0xFF5C: {0x7C, 0x9000},
328 0xFF5D: {0x7D, 0x9000},
329 0xFF5E: {0x7E, 0x9000},
330 0xFF5F: {0x2985, 0x9000},
331 0xFF60: {0x2986, 0x9000},
332 0xFF61: {0x3002, 0xB000},
333 0xFF62: {0x300C, 0xB000},
334 0xFF63: {0x300D, 0xB000},
335 0xFF64: {0x3001, 0xB000},
336 0xFF65: {0x30FB, 0xB000},
337 0xFF66: {0x30F2, 0xB000},
338 0xFF67: {0x30A1, 0xB000},
339 0xFF68: {0x30A3, 0xB000},
340 0xFF69: {0x30A5, 0xB000},
341 0xFF6A: {0x30A7, 0xB000},
342 0xFF6B: {0x30A9, 0xB000},
343 0xFF6C: {0x30E3, 0xB000},
344 0xFF6D: {0x30E5, 0xB000},
345 0xFF6E: {0x30E7, 0xB000},
346 0xFF6F: {0x30C3, 0xB000},
347 0xFF70: {0x30FC, 0xB000},
348 0xFF71: {0x30A2, 0xB000},
349 0xFF72: {0x30A4, 0xB000},
350 0xFF73: {0x30A6, 0xB000},
351 0xFF74: {0x30A8, 0xB000},
352 0xFF75: {0x30AA, 0xB000},
353 0xFF76: {0x30AB, 0xB000},
354 0xFF77: {0x30AD, 0xB000},
355 0xFF78: {0x30AF, 0xB000},
356 0xFF79: {0x30B1, 0xB000},
357 0xFF7A: {0x30B3, 0xB000},
358 0xFF7B: {0x30B5, 0xB000},
359 0xFF7C: {0x30B7, 0xB000},
360 0xFF7D: {0x30B9, 0xB000},
361 0xFF7E: {0x30BB, 0xB000},
362 0xFF7F: {0x30BD, 0xB000},
363 0xFF80: {0x30BF, 0xB000},
364 0xFF81: {0x30C1, 0xB000},
365 0xFF82: {0x30C4, 0xB000},
366 0xFF83: {0x30C6, 0xB000},
367 0xFF84: {0x30C8, 0xB000},
368 0xFF85: {0x30CA, 0xB000},
369 0xFF86: {0x30CB, 0xB000},
370 0xFF87: {0x30CC, 0xB000},
371 0xFF88: {0x30CD, 0xB000},
372 0xFF89: {0x30CE, 0xB000},
373 0xFF8A: {0x30CF, 0xB000},
374 0xFF8B: {0x30D2, 0xB000},
375 0xFF8C: {0x30D5, 0xB000},
376 0xFF8D: {0x30D8, 0xB000},
377 0xFF8E: {0x30DB, 0xB000},
378 0xFF8F: {0x30DE, 0xB000},
379 0xFF90: {0x30DF, 0xB000},
380 0xFF91: {0x30E0, 0xB000},
381 0xFF92: {0x30E1, 0xB000},
382 0xFF93: {0x30E2, 0xB000},
383 0xFF94: {0x30E4, 0xB000},
384 0xFF95: {0x30E6, 0xB000},
385 0xFF96: {0x30E8, 0xB000},
386 0xFF97: {0x30E9, 0xB000},
387 0xFF98: {0x30EA, 0xB000},
388 0xFF99: {0x30EB, 0xB000},
389 0xFF9A: {0x30EC, 0xB000},
390 0xFF9B: {0x30ED, 0xB000},
391 0xFF9C: {0x30EF, 0xB000},
392 0xFF9D: {0x30F3, 0xB000},
393 0xFF9E: {0x3099, 0xB000},
394 0xFF9F: {0x309A, 0xB000},
395 0xFFA0: {0x3164, 0xB000},
396 0xFFA1: {0x3131, 0xB000},
397 0xFFA2: {0x3132, 0xB000},
398 0xFFA3: {0x3133, 0xB000},
399 0xFFA4: {0x3134, 0xB000},
400 0xFFA5: {0x3135, 0xB000},
401 0xFFA6: {0x3136, 0xB000},
402 0xFFA7: {0x3137, 0xB000},
403 0xFFA8: {0x3138, 0xB000},
404 0xFFA9: {0x3139, 0xB000},
405 0xFFAA: {0x313A, 0xB000},
406 0xFFAB: {0x313B, 0xB000},
407 0xFFAC: {0x313C, 0xB000},
408 0xFFAD: {0x313D, 0xB000},
409 0xFFAE: {0x313E, 0xB000},
410 0xFFAF: {0x313F, 0xB000},
411 0xFFB0: {0x3140, 0xB000},
412 0xFFB1: {0x3141, 0xB000},
413 0xFFB2: {0x3142, 0xB000},
414 0xFFB3: {0x3143, 0xB000},
415 0xFFB4: {0x3144, 0xB000},
416 0xFFB5: {0x3145, 0xB000},
417 0xFFB6: {0x3146, 0xB000},
418 0xFFB7: {0x3147, 0xB000},
419 0xFFB8: {0x3148, 0xB000},
420 0xFFB9: {0x3149, 0xB000},
421 0xFFBA: {0x314A, 0xB000},
422 0xFFBB: {0x314B, 0xB000},
423 0xFFBC: {0x314C, 0xB000},
424 0xFFBD: {0x314D, 0xB000},
425 0xFFBE: {0x314E, 0xB000},
426 0xFFC2: {0x314F, 0xB000},
427 0xFFC3: {0x3150, 0xB000},
428 0xFFC4: {0x3151, 0xB000},
429 0xFFC5: {0x3152, 0xB000},
430 0xFFC6: {0x3153, 0xB000},
431 0xFFC7: {0x3154, 0xB000},
432 0xFFCA: {0x3155, 0xB000},
433 0xFFCB: {0x3156, 0xB000},
434 0xFFCC: {0x3157, 0xB000},
435 0xFFCD: {0x3158, 0xB000},
436 0xFFCE: {0x3159, 0xB000},
437 0xFFCF: {0x315A, 0xB000},
438 0xFFD2: {0x315B, 0xB000},
439 0xFFD3: {0x315C, 0xB000},
440 0xFFD4: {0x315D, 0xB000},
441 0xFFD5: {0x315E, 0xB000},
442 0xFFD6: {0x315F, 0xB000},
443 0xFFD7: {0x3160, 0xB000},
444 0xFFDA: {0x3161, 0xB000},
445 0xFFDB: {0x3162, 0xB000},
446 0xFFDC: {0x3163, 0xB000},
447 0xFFE0: {0xA2, 0x9000},
448 0xFFE1: {0xA3, 0x9000},
449 0xFFE2: {0xAC, 0x9000},
450 0xFFE3: {0xAF, 0x9000},
451 0xFFE4: {0xA6, 0x9000},
452 0xFFE5: {0xA5, 0x9000},
453 0xFFE6: {0x20A9, 0x9000},
454 0xFFE8: {0x2502, 0xB000},
455 0xFFE9: {0x2190, 0xB000},
456 0xFFEA: {0x2191, 0xB000},
457 0xFFEB: {0x2192, 0xB000},
458 0xFFEC: {0x2193, 0xB000},
459 0xFFED: {0x25A0, 0xB000},
460 0xFFEE: {0x25CB, 0xB000},
461 }
462
View as plain text