diff options
author | Elliott Hughes <enh@google.com> | 2021-04-01 15:12:06 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-04-01 15:12:06 -0700 |
commit | 6cf80b8fa7eece3694d7375ff5de9a7f2cd19f7e (patch) | |
tree | 8e925d800e27f7a70c2b6a131b14526bc0f095b5 /Lib/fontTools/unicode.py | |
parent | 0e9d14bbfdfd2a1bf74c38eed07dc9b0ddf0162f (diff) | |
download | fonttools-6cf80b8fa7eece3694d7375ff5de9a7f2cd19f7e.tar.gz |
Upgrade fonttools to 4.22.0android-s-beta-2android-s-beta-1
Test: make
Change-Id: I69cdb494f27868e707969c325386f039e5ea0e45
Diffstat (limited to 'Lib/fontTools/unicode.py')
-rw-r--r-- | Lib/fontTools/unicode.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Lib/fontTools/unicode.py b/Lib/fontTools/unicode.py index 23589db7..e0867aa1 100644 --- a/Lib/fontTools/unicode.py +++ b/Lib/fontTools/unicode.py @@ -1,7 +1,4 @@ -from fontTools.misc.py23 import * - def _makeunicodes(f): - import re lines = iter(f.readlines()) unicodes = {} for line in lines: @@ -16,7 +13,7 @@ def _makeunicodes(f): class _UnicodeCustom(object): def __init__(self, f): - if isinstance(f, basestring): + if isinstance(f, str): with open(f) as fd: codes = _makeunicodes(fd) else: @@ -39,7 +36,7 @@ class _UnicodeBuiltin(object): except ImportError: import unicodedata try: - return unicodedata.name(unichr(charCode)) + return unicodedata.name(chr(charCode)) except ValueError: return "????" |