Last active
February 15, 2017 16:47
-
-
Save tasuten/4ef3843b3429c6dc8958767587542a64 to your computer and use it in GitHub Desktop.
parse "5c backslash"-like lines file and list up ambiwidth glyphs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import unicodedata | |
def main(): | |
for line in sys.stdin: | |
line_data = line.split(" ") | |
# Python 2.7 | |
w = unicodedata.east_asian_width(unichr(int(line_data[0], 16))) | |
if w == 'A': | |
print line.rstrip('\n') | |
if __name__ == '__main__': | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a1 exclamdown | |
a4 currency | |
a7 section | |
a8 dieresis | |
aa ordfeminine | |
ad uni00AD | |
ae registered | |
b0 degree | |
b1 plusminus | |
b2 uni00B2 | |
b3 uni00B3 | |
b4 acute | |
b6 paragraph | |
b7 periodcentered | |
b8 cedilla | |
b9 uni00B9 | |
ba ordmasculine | |
bc onequarter | |
bd onehalf | |
be threequarters | |
bf questiondown | |
c6 AE | |
d0 Eth | |
d7 multiply | |
d8 Oslash | |
de Thorn | |
df germandbls | |
e0 agrave | |
e1 aacute | |
e6 ae | |
e8 egrave | |
e9 eacute | |
ea ecircumflex | |
ec igrave | |
ed iacute | |
f0 eth | |
f2 ograve | |
f3 oacute | |
f7 divide | |
f8 oslash | |
f9 ugrave | |
fa uacute | |
fc udieresis | |
fe thorn | |
101 amacron | |
111 dcroat | |
113 emacron | |
11b ecaron | |
126 Hbar | |
127 hbar | |
12b imacron | |
131 dotlessi | |
138 kgreenlandic | |
13f Ldot | |
140 ldot | |
141 Lslash | |
142 lslash | |
144 nacute | |
148 ncaron | |
14a Eng | |
14b eng | |
14d omacron | |
152 OE | |
153 oe | |
166 Tbar | |
167 tbar | |
16b umacron | |
2c7 caron | |
2c9 uni02C9 | |
2ca uni02CA | |
2cb uni02CB | |
2d8 breve | |
2d9 dotaccent | |
2da ring | |
2db ogonek | |
2dd hungarumlaut | |
300 gravecomb | |
301 acutecomb | |
302 uni0302 | |
303 tildecomb | |
304 uni0304 | |
306 uni0306 | |
307 uni0307 | |
308 uni0308 | |
309 hookabovecomb | |
30a uni030A | |
30b uni030B | |
30c uni030C | |
30f uni030F | |
311 uni0311 | |
312 uni0312 | |
31b uni031B | |
323 dotbelowcomb | |
324 uni0324 | |
326 uni0326 | |
327 uni0327 | |
328 uni0328 | |
32e uni032E | |
331 uni0331 | |
335 uni0335 | |
336 uni0336 | |
2010 uni2010 | |
2013 endash | |
2014 emdash | |
2015 uni2015 | |
2018 quoteleft | |
2019 quoteright | |
201c quotedblleft | |
201d quotedblright | |
2020 dagger | |
2021 daggerdbl | |
2022 bullet | |
2026 ellipsis | |
2030 perthousand | |
2032 minute | |
2033 second | |
2074 uni2074 | |
207f uni207F | |
2081 uni2081 | |
2082 uni2082 | |
2083 uni2083 | |
2084 uni2084 | |
20ac Euro | |
2113 uni2113 | |
2116 uni2116 | |
2122 trademark | |
2126 uni2126 | |
2190 arrowleft | |
2191 arrowup | |
2192 arrowright | |
2193 arrowdown | |
2194 arrowboth | |
2195 arrowupdn | |
2196 uni2196 | |
2197 uni2197 | |
2198 uni2198 | |
2199 uni2199 | |
21e7 uni21E7 | |
2202 partialdiff | |
2208 element | |
220f product | |
2211 summation | |
2215 uni2215 | |
221a radical | |
221e infinity | |
222b integral | |
2248 approxequal | |
2260 notequal | |
2264 lessequal | |
2265 greaterequal | |
2295 circleplus | |
25c6 uni25C6 | |
25c7 uni25C7 | |
25cb circle | |
25cf uni25CF | |
2660 spade | |
2663 club | |
2665 heart | |
fffd uniFFFD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d nonmarkingreturn N | |
20 space Na | |
21 exclam Na | |
22 quotedbl Na | |
23 numbersign Na | |
24 dollar Na | |
25 percent Na | |
26 ampersand Na | |
27 quotesingle Na | |
28 parenleft Na | |
29 parenright Na | |
2a asterisk Na | |
2b plus Na | |
2c comma Na | |
2d hyphen Na | |
2e period Na | |
2f slash Na | |
30 zero Na | |
31 one Na | |
32 two Na | |
33 three Na | |
34 four Na | |
35 five Na | |
36 six Na | |
37 seven Na | |
38 eight Na | |
39 nine Na | |
3a colon Na | |
3b semicolon Na | |
3c less Na | |
3d equal Na | |
3e greater Na | |
3f question Na | |
40 at Na | |
41 A Na | |
42 B Na | |
43 C Na | |
44 D Na | |
45 E Na | |
46 F Na | |
47 G Na | |
48 H Na | |
49 I Na | |
4a J Na | |
4b K Na | |
4c L Na | |
4d M Na | |
4e N Na | |
4f O Na | |
50 P Na | |
51 Q Na | |
52 R Na | |
53 S Na | |
54 T Na | |
55 U Na | |
56 V Na | |
57 W Na | |
58 X Na | |
59 Y Na | |
5a Z Na | |
5b bracketleft Na | |
5c backslash Na | |
5d bracketright Na | |
5e asciicircum Na | |
5f underscore Na | |
60 grave Na | |
61 a Na | |
62 b Na | |
63 c Na | |
64 d Na | |
65 e Na | |
66 f Na | |
67 g Na | |
68 h Na | |
69 i Na | |
6a j Na | |
6b k Na | |
6c l Na | |
6d m Na | |
6e n Na | |
6f o Na | |
70 p Na | |
71 q Na | |
72 r Na | |
73 s Na | |
74 t Na | |
75 u Na | |
76 v Na | |
77 w Na | |
78 x Na | |
79 y Na | |
7a z Na | |
7b braceleft Na | |
7c bar Na | |
7d braceright Na | |
7e asciitilde Na | |
a0 uni00A0 N | |
a2 cent Na | |
a3 sterling Na | |
a5 yen Na | |
a6 brokenbar Na | |
a9 copyright N | |
ab guillemotleft N | |
ac logicalnot Na | |
af macron Na | |
b5 uni00B5 N | |
bb guillemotright N | |
c0 Agrave N | |
c1 Aacute N | |
c2 Acircumflex N | |
c3 Atilde N | |
c4 Adieresis N | |
c5 Aring N | |
c7 Ccedilla N | |
c8 Egrave N | |
c9 Eacute N | |
ca Ecircumflex N | |
cb Edieresis N | |
cc Igrave N | |
cd Iacute N | |
ce Icircumflex N | |
cf Idieresis N | |
d1 Ntilde N | |
d2 Ograve N | |
d3 Oacute N | |
d4 Ocircumflex N | |
d5 Otilde N | |
d6 Odieresis N | |
d9 Ugrave N | |
da Uacute N | |
db Ucircumflex N | |
dc Udieresis N | |
dd Yacute N | |
e2 acircumflex N | |
e3 atilde N | |
e4 adieresis N | |
e5 aring N | |
e7 ccedilla N | |
eb edieresis N | |
ee icircumflex N | |
ef idieresis N | |
f1 ntilde N | |
f4 ocircumflex N | |
f5 otilde N | |
f6 odieresis N | |
fb ucircumflex N | |
fd yacute N | |
ff ydieresis N | |
100 Amacron N | |
102 Abreve N | |
103 abreve N | |
104 Aogonek N | |
105 aogonek N | |
106 Cacute N | |
107 cacute N | |
108 Ccircumflex N | |
109 ccircumflex N | |
10a Cdotaccent N | |
10b cdotaccent N | |
10c Ccaron N | |
10d ccaron N | |
10e Dcaron N | |
10f dcaron N | |
110 Dcroat N | |
112 Emacron N | |
114 Ebreve N | |
115 ebreve N | |
116 Edotaccent N | |
117 edotaccent N | |
118 Eogonek N | |
119 eogonek N | |
11a Ecaron N | |
11c Gcircumflex N | |
11d gcircumflex N | |
11e Gbreve N | |
11f gbreve N | |
120 Gdotaccent N | |
121 gdotaccent N | |
122 Gcommaaccent N | |
123 gcommaaccent N | |
124 Hcircumflex N | |
125 hcircumflex N | |
128 Itilde N | |
129 itilde N | |
12a Imacron N | |
12c Ibreve N | |
12d ibreve N | |
12e Iogonek N | |
12f iogonek N | |
130 Idotaccent N | |
134 Jcircumflex N | |
135 jcircumflex N | |
136 Kcommaaccent N | |
137 kcommaaccent N | |
139 Lacute N | |
13a lacute N | |
13b Lcommaaccent N | |
13c lcommaaccent N | |
13d Lcaron N | |
13e lcaron N | |
143 Nacute N | |
145 Ncommaaccent N | |
146 ncommaaccent N | |
147 Ncaron N | |
14c Omacron N | |
14e Obreve N | |
14f obreve N | |
150 Ohungarumlaut N | |
151 ohungarumlaut N | |
154 Racute N | |
155 racute N | |
156 Rcommaaccent N | |
157 rcommaaccent N | |
158 Rcaron N | |
159 rcaron N | |
15a Sacute N | |
15b sacute N | |
15c Scircumflex N | |
15d scircumflex N | |
15e Scedilla N | |
15f scedilla N | |
160 Scaron N | |
161 scaron N | |
162 uni0162 N | |
163 uni0163 N | |
164 Tcaron N | |
165 tcaron N | |
168 Utilde N | |
169 utilde N | |
16a Umacron N | |
16c Ubreve N | |
16d ubreve N | |
16e Uring N | |
16f uring N | |
170 Uhungarumlaut N | |
171 uhungarumlaut N | |
172 Uogonek N | |
173 uogonek N | |
174 Wcircumflex N | |
175 wcircumflex N | |
176 Ycircumflex N | |
177 ycircumflex N | |
178 Ydieresis N | |
179 Zacute N | |
17a zacute N | |
17b Zdotaccent N | |
17c zdotaccent N | |
17d Zcaron N | |
17e zcaron N | |
18f uni018F N | |
192 florin N | |
198 uni0198 N | |
1a0 Ohorn N | |
1a1 ohorn N | |
1af Uhorn N | |
1b0 uhorn N | |
1b8 uni01B8 N | |
1b9 uni01B9 N | |
1c7 uni01C7 N | |
1c8 uni01C8 N | |
1c9 uni01C9 N | |
1e6 Gcaron N | |
1e7 gcaron N | |
1ea uni01EA N | |
1eb uni01EB N | |
1fa Aringacute N | |
1fb aringacute N | |
1fc AEacute N | |
1fd aeacute N | |
1fe Oslashacute N | |
1ff oslashacute N | |
200 uni0200 N | |
201 uni0201 N | |
202 uni0202 N | |
203 uni0203 N | |
204 uni0204 N | |
205 uni0205 N | |
206 uni0206 N | |
207 uni0207 N | |
208 uni0208 N | |
209 uni0209 N | |
20a uni020A N | |
20b uni020B N | |
20c uni020C N | |
20d uni020D N | |
20e uni020E N | |
20f uni020F N | |
210 uni0210 N | |
211 uni0211 N | |
212 uni0212 N | |
213 uni0213 N | |
214 uni0214 N | |
215 uni0215 N | |
216 uni0216 N | |
217 uni0217 N | |
218 Scommaaccent N | |
219 scommaaccent N | |
21a uni021A N | |
21b uni021B N | |
22a uni022A N | |
22b uni022B N | |
22c uni022C N | |
22d uni022D N | |
230 uni0230 N | |
231 uni0231 N | |
232 uni0232 N | |
233 uni0233 N | |
237 uni0237 N | |
24d uni024D N | |
259 uni0259 N | |
27b uni027B N | |
298 uni0298 N | |
29a uni029A N | |
2b9 uni02B9 N | |
2ba uni02BA N | |
2bb uni02BB N | |
2bc uni02BC N | |
2be uni02BE N | |
2bf uni02BF N | |
2c6 circumflex N | |
2c8 uni02C8 N | |
2cc uni02CC N | |
2dc tilde N | |
375 uni0375 N | |
1e08 uni1E08 N | |
1e09 uni1E09 N | |
1e0c uni1E0C N | |
1e0d uni1E0D N | |
1e0e uni1E0E N | |
1e0f uni1E0F N | |
1e14 uni1E14 N | |
1e15 uni1E15 N | |
1e16 uni1E16 N | |
1e17 uni1E17 N | |
1e1c uni1E1C N | |
1e1d uni1E1D N | |
1e20 uni1E20 N | |
1e21 uni1E21 N | |
1e24 uni1E24 N | |
1e25 uni1E25 N | |
1e2a uni1E2A N | |
1e2b uni1E2B N | |
1e2e uni1E2E N | |
1e2f uni1E2F N | |
1e36 uni1E36 N | |
1e37 uni1E37 N | |
1e3a uni1E3A N | |
1e3b uni1E3B N | |
1e42 uni1E42 N | |
1e43 uni1E43 N | |
1e44 uni1E44 N | |
1e45 uni1E45 N | |
1e46 uni1E46 N | |
1e47 uni1E47 N | |
1e48 uni1E48 N | |
1e49 uni1E49 N | |
1e4c uni1E4C N | |
1e4d uni1E4D N | |
1e4e uni1E4E N | |
1e4f uni1E4F N | |
1e50 uni1E50 N | |
1e51 uni1E51 N | |
1e52 uni1E52 N | |
1e53 uni1E53 N | |
1e5a uni1E5A N | |
1e5b uni1E5B N | |
1e5e uni1E5E N | |
1e5f uni1E5F N | |
1e60 uni1E60 N | |
1e61 uni1E61 N | |
1e62 uni1E62 N | |
1e63 uni1E63 N | |
1e64 uni1E64 N | |
1e65 uni1E65 N | |
1e66 uni1E66 N | |
1e67 uni1E67 N | |
1e68 uni1E68 N | |
1e69 uni1E69 N | |
1e6c uni1E6C N | |
1e6d uni1E6D N | |
1e6e uni1E6E N | |
1e6f uni1E6F N | |
1e78 uni1E78 N | |
1e79 uni1E79 N | |
1e7a uni1E7A N | |
1e7b uni1E7B N | |
1e80 Wgrave N | |
1e81 wgrave N | |
1e82 Wacute N | |
1e83 wacute N | |
1e84 Wdieresis N | |
1e85 wdieresis N | |
1e8e uni1E8E N | |
1e8f uni1E8F N | |
1e92 uni1E92 N | |
1e93 uni1E93 N | |
1e97 uni1E97 N | |
1e9e uni1E9E N | |
1ea0 uni1EA0 N | |
1ea1 uni1EA1 N | |
1ea2 uni1EA2 N | |
1ea3 uni1EA3 N | |
1ea4 uni1EA4 N | |
1ea5 uni1EA5 N | |
1ea6 uni1EA6 N | |
1ea7 uni1EA7 N | |
1ea8 uni1EA8 N | |
1ea9 uni1EA9 N | |
1eaa uni1EAA N | |
1eab uni1EAB N | |
1eac uni1EAC N | |
1ead uni1EAD N | |
1eae uni1EAE N | |
1eaf uni1EAF N | |
1eb0 uni1EB0 N | |
1eb1 uni1EB1 N | |
1eb2 uni1EB2 N | |
1eb3 uni1EB3 N | |
1eb4 uni1EB4 N | |
1eb5 uni1EB5 N | |
1eb6 uni1EB6 N | |
1eb7 uni1EB7 N | |
1eb8 uni1EB8 N | |
1eb9 uni1EB9 N | |
1eba uni1EBA N | |
1ebb uni1EBB N | |
1ebc uni1EBC N | |
1ebd uni1EBD N | |
1ebe uni1EBE N | |
1ebf uni1EBF N | |
1ec0 uni1EC0 N | |
1ec1 uni1EC1 N | |
1ec2 uni1EC2 N | |
1ec3 uni1EC3 N | |
1ec4 uni1EC4 N | |
1ec5 uni1EC5 N | |
1ec6 uni1EC6 N | |
1ec7 uni1EC7 N | |
1ec8 uni1EC8 N | |
1ec9 uni1EC9 N | |
1eca uni1ECA N | |
1ecb uni1ECB N | |
1ecc uni1ECC N | |
1ecd uni1ECD N | |
1ece uni1ECE N | |
1ecf uni1ECF N | |
1ed0 uni1ED0 N | |
1ed1 uni1ED1 N | |
1ed2 uni1ED2 N | |
1ed3 uni1ED3 N | |
1ed4 uni1ED4 N | |
1ed5 uni1ED5 N | |
1ed6 uni1ED6 N | |
1ed7 uni1ED7 N | |
1ed8 uni1ED8 N | |
1ed9 uni1ED9 N | |
1eda uni1EDA N | |
1edb uni1EDB N | |
1edc uni1EDC N | |
1edd uni1EDD N | |
1ede uni1EDE N | |
1edf uni1EDF N | |
1ee0 uni1EE0 N | |
1ee1 uni1EE1 N | |
1ee2 uni1EE2 N | |
1ee3 uni1EE3 N | |
1ee4 uni1EE4 N | |
1ee5 uni1EE5 N | |
1ee6 uni1EE6 N | |
1ee7 uni1EE7 N | |
1ee8 uni1EE8 N | |
1ee9 uni1EE9 N | |
1eea uni1EEA N | |
1eeb uni1EEB N | |
1eec uni1EEC N | |
1eed uni1EED N | |
1eee uni1EEE N | |
1eef uni1EEF N | |
1ef0 uni1EF0 N | |
1ef1 uni1EF1 N | |
1ef2 Ygrave N | |
1ef3 ygrave N | |
1ef4 uni1EF4 N | |
1ef5 uni1EF5 N | |
1ef6 uni1EF6 N | |
1ef7 uni1EF7 N | |
1ef8 uni1EF8 N | |
1ef9 uni1EF9 N | |
2007 uni2007 N | |
2008 uni2008 N | |
2009 uni2009 N | |
200a uni200A N | |
200b uni200B N | |
2012 figuredash N | |
201a quotesinglbase N | |
201e quotedblbase N | |
2039 guilsinglleft N | |
203a guilsinglright N | |
2044 fraction N | |
2070 uni2070 N | |
2075 uni2075 N | |
2076 uni2076 N | |
2077 uni2077 N | |
2078 uni2078 N | |
2079 uni2079 N | |
207b uni207B N | |
2080 uni2080 N | |
2085 uni2085 N | |
2086 uni2086 N | |
2087 uni2087 N | |
2088 uni2088 N | |
2089 uni2089 N | |
20a1 colonmonetary N | |
20a3 franc N | |
20a4 lira N | |
20a6 uni20A6 N | |
20a7 peseta N | |
20a9 uni20A9 H | |
20ab dong N | |
20ad uni20AD N | |
20b1 uni20B1 N | |
20b2 uni20B2 N | |
20b5 uni20B5 N | |
20b9 uni20B9 F | |
20ba uni20BA F | |
20bc uni20BC F | |
20bd uni20BD F | |
2124 uni2124 N | |
212e estimated N | |
21e6 uni21E6 N | |
21e8 uni21E8 N | |
21e9 uni21E9 N | |
21ea uni21EA N | |
2205 emptyset N | |
2206 uni2206 N | |
2212 minus N | |
2217 asteriskmath N | |
2219 uni2219 N | |
2302 house N | |
2318 uni2318 N | |
2325 uni2325 N | |
2326 uni2326 N | |
2327 uni2327 N | |
232b uni232B N | |
238b uni238B N | |
23ce uni23CE N | |
2423 uni2423 N | |
25ca lozenge N | |
2639 uni2639 N | |
263a smileface N | |
263b invsmileface N | |
2666 diamond N | |
2713 uni2713 N | |
2714 uni2714 N | |
2715 uni2715 N | |
2717 uni2717 N | |
2718 uni2718 N | |
2b05 uni2B05 N | |
2b06 uni2B06 N | |
2b07 uni2B07 N | |
2b95 uni2B95 F | |
2e12 uni2E12 N | |
fb01 fi N | |
fb02 fl N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 space Na | |
21 exclam Na | |
22 quotedbl Na | |
23 numbersign Na | |
24 dollar Na | |
25 percent Na | |
26 ampersand Na | |
27 quotesingle Na | |
28 parenleft Na | |
29 parenright Na | |
2a asterisk Na | |
2b plus Na | |
2c comma Na | |
2d hyphen Na | |
2e period Na | |
2f slash Na | |
30 zero Na | |
31 one Na | |
32 two Na | |
33 three Na | |
34 four Na | |
35 five Na | |
36 six Na | |
37 seven Na | |
38 eight Na | |
39 nine Na | |
3a colon Na | |
3b semicolon Na | |
3c less Na | |
3d equal Na | |
3e greater Na | |
3f question Na | |
40 at Na | |
41 A Na | |
42 B Na | |
43 C Na | |
44 D Na | |
45 E Na | |
46 F Na | |
47 G Na | |
48 H Na | |
49 I Na | |
4a J Na | |
4b K Na | |
4c L Na | |
4d M Na | |
4e N Na | |
4f O Na | |
50 P Na | |
51 Q Na | |
52 R Na | |
53 S Na | |
54 T Na | |
55 U Na | |
56 V Na | |
57 W Na | |
58 X Na | |
59 Y Na | |
5a Z Na | |
5b bracketleft Na | |
5c backslash Na | |
5d bracketright Na | |
5e asciicircum Na | |
5f underscore Na | |
60 grave Na | |
61 a Na | |
62 b Na | |
63 c Na | |
64 d Na | |
65 e Na | |
66 f Na | |
67 g Na | |
68 h Na | |
69 i Na | |
6a j Na | |
6b k Na | |
6c l Na | |
6d m Na | |
6e n Na | |
6f o Na | |
70 p Na | |
71 q Na | |
72 r Na | |
73 s Na | |
74 t Na | |
75 u Na | |
76 v Na | |
77 w Na | |
78 x Na | |
79 y Na | |
7a z Na | |
7b braceleft Na | |
7c bar Na | |
7d braceright Na | |
7e asciitilde Na | |
a2 cent Na | |
a3 sterling Na | |
a5 yen Na | |
a6 brokenbar Na | |
ac logicalnot Na | |
af macron Na | |
20a9 uni20A9 H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import fontforge | |
import argparse | |
font = fontforge.open("./Genze-Regular.ttf") | |
for glyph in font.glyphs("encoding"): | |
code = glyph.unicode | |
if code != -1: | |
print '%x' % code, glyph.glyphname | |
font.close() | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Na(rrow), H(alf)が所謂半角、W(ide), F(ull)がいわゆる全角、N(eutral)が中立(言語依存)だが多分Genzeでは500幅