diff options
author | Rasmus Andersson <rasmus@notion.se> | 2021-03-29 01:21:20 +0300 |
---|---|---|
committer | Rasmus Andersson <rasmus@notion.se> | 2021-03-29 01:21:24 +0300 |
commit | 5e0d7cbfda85a1ebfb96c7668f8151d4a5f9833a (patch) | |
tree | c04e208030d1e00c52b2ee86b899757c757b5bc3 /misc | |
parent | cbc43f3a88472585bfb4fd33d26caabb225afc47 (diff) | |
download | inter-5e0d7cbfda85a1ebfb96c7668f8151d4a5f9833a.tar.xz |
fix python3 issuev3.16
Diffstat (limited to 'misc')
-rwxr-xr-x | misc/tools/gen-metrics-and-svgs.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/misc/tools/gen-metrics-and-svgs.py b/misc/tools/gen-metrics-and-svgs.py index 4b6ff22a2..8d38ce958 100755 --- a/misc/tools/gen-metrics-and-svgs.py +++ b/misc/tools/gen-metrics-and-svgs.py @@ -168,7 +168,9 @@ def genKerningInfo(ufo, glyphnames, nameToIdMap): # load groups 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 = [] for kt in kerning.keys(): @@ -177,12 +179,12 @@ def genKerningInfo(ufo, glyphnames, nameToIdMap): leftnames = [] rightnames = [] - if leftname.startswith('public.kern'): + if leftname.startswith(u'public.kern'): leftnames = groups[leftname] else: leftnames = [leftname] - if rightname.startswith('public.kern'): + if rightname.startswith(u'public.kern'): rightnames = groups[rightname] else: rightnames = [rightname] |