googlefonts / fontdiffenator

Font comparison tool
Apache License 2.0
79 stars 13 forks source link

use chr instead of fonttools.misc.unichr #91

Closed m4rc1e closed 3 years ago

m4rc1e commented 3 years ago

FontTools recently tidied up the misc module, https://github.com/fonttools/fonttools/pull/2243 which is causing the following fail: https://github.com/google/fonts/pull/3275/checks?check_run_id=2245344070

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.8/x64/bin/gftools-qa.py", line 48, in <module>
    from diffenator.font import DFont
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/diffenator/font.py", line 6, in <module>
    from diffenator.hbinput import HbInputGenerator
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/diffenator/hbinput.py", line 19, in <module>
    from fontTools.misc import unichr
ImportError: cannot import name 'unichr' from 'fontTools.misc' (/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/site-packages/fontTools/misc/__init__.py)
Error: Process completed with exit code 1.

Since this tool is now py3 only, there's no point using the fontTool's unichr function since py3's chr builtin function works just fine.