fix python3 issue
This commit is contained in:
parent
cbc43f3a88
commit
5e0d7cbfda
1 changed files with 5 additions and 3 deletions
|
|
@ -168,7 +168,9 @@ def genKerningInfo(ufo, glyphnames, nameToIdMap):
|
||||||
|
|
||||||
# load groups
|
# load groups
|
||||||
filename = os.path.join(ufo.path, 'groups.plist')
|
filename = os.path.join(ufo.path, 'groups.plist')
|
||||||
groups = plistlib.readPlist(filename)
|
groups = None
|
||||||
|
with open(filename, 'rb') as f:
|
||||||
|
groups = plistlib.load(f)
|
||||||
|
|
||||||
pairs = []
|
pairs = []
|
||||||
for kt in kerning.keys():
|
for kt in kerning.keys():
|
||||||
|
|
@ -177,12 +179,12 @@ def genKerningInfo(ufo, glyphnames, nameToIdMap):
|
||||||
leftnames = []
|
leftnames = []
|
||||||
rightnames = []
|
rightnames = []
|
||||||
|
|
||||||
if leftname.startswith('public.kern'):
|
if leftname.startswith(u'public.kern'):
|
||||||
leftnames = groups[leftname]
|
leftnames = groups[leftname]
|
||||||
else:
|
else:
|
||||||
leftnames = [leftname]
|
leftnames = [leftname]
|
||||||
|
|
||||||
if rightname.startswith('public.kern'):
|
if rightname.startswith(u'public.kern'):
|
||||||
rightnames = groups[rightname]
|
rightnames = groups[rightname]
|
||||||
else:
|
else:
|
||||||
rightnames = [rightname]
|
rightnames = [rightname]
|
||||||
|
|
|
||||||
Reference in a new issue