[agl] ensure AGL glyph names are 'str' type
We are using unicode_literals in this module since 329261b. Because of that, on py27 sometimes a TTFont glyphOrder may end up with a mix of `str` and `unicode` glyph names. While I'd love to change every single 'text' string to unicode, maybe in this case it makes sense to use the native `str` type (`bytes` on py2, unicode string on py3) for the UV2AGL and AGL2UV dictionaries, as glyph names can only contain ascii characters anyway. See https://github.com/fonttools/fonttools/pull/774#discussion_r98327429
This commit is contained in:
parent
93b97510bc
commit
d8c40583d1
@ -731,7 +731,7 @@ def _builddicts():
|
||||
unicode = m.group(1)
|
||||
assert len(unicode) == 4
|
||||
unicode = int(unicode, 16)
|
||||
glyphName = m.group(2)
|
||||
glyphName = tostr(m.group(2))
|
||||
if glyphName in AGL2UV:
|
||||
# the above table contains identical duplicates
|
||||
assert AGL2UV[glyphName] == unicode
|
||||
|
Loading…
x
Reference in New Issue
Block a user