Skip to content

Commit 720f57d

Browse files
authored
Update sourcehantocl.py
1 parent 8448ec5 commit 720f57d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

main/sourcehantocl.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
otfccdump += '2'
1212
otfccbuild += '2'
1313

14-
fontver='1.001'
14+
fontver='1.002'
1515
fontid='AAF'
1616

1717
def build_glyph_codes():
@@ -167,7 +167,7 @@ def creattmp(mch, pun, simp):
167167
if len(font['GSUB']['features'][f1]) == 0:
168168
f1todel.add(f1)
169169
continue
170-
for f1 in f1todel:
170+
for f1 in f1todel:
171171
del font['GSUB']['features'][f1]
172172
print('正在处理异体字信息...')
173173
dv=dict()
@@ -179,9 +179,9 @@ def creattmp(mch, pun, simp):
179179
tv=dict()
180180
with open('uvs-get-jp1-MARK.txt', 'r', encoding='utf-8') as f:
181181
for line in f.readlines():
182+
line=line.strip()
182183
if line.startswith('#'):
183184
continue
184-
line=line.strip()
185185
if line.endswith('X'):
186186
a=line.split(' ')
187187
tv[str(ord(a[0]))]=str(int(a[3].strip('X'), 16))
@@ -208,8 +208,7 @@ def creattmp(mch, pun, simp):
208208
unit=str(ord(chs[1]))
209209
if unit in font['cmap']:
210210
print('处理 '+chs[0]+'-'+chs[1])
211-
gn=font['cmap'][unit]
212-
font['cmap'][unis] = gn
211+
font['cmap'][unis] = font['cmap'][unit]
213212
if rmun=='y':
214213
print('正在移除字形...')
215214
glyph_codes = build_glyph_codes()

0 commit comments

Comments
 (0)