ipython / xkcd-font

The xkcd font
https://cdn.rawgit.com/ipython/xkcd-font/master/preview.html
Other
1.09k stars 48 forks source link

fix for various versions of FontForge official binary package #35

Open dummy-index opened 3 years ago

dummy-index commented 3 years ago

Python 2 support is deprecated on latest FontForge. Some fix to run pt4_svg_to_font.py with ffpython.exe within several versions of FontForgeBuilds.

dummy-index commented 3 years ago

Why TravisCI fails to run pt2?

Traceback (most recent call last):
  File "pt2_character_classification.py", line 115, in <module>
    b64_repr = base64.b64encode(char.encode('utf-8')).decode('utf-8')
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 0: ordinal not in range(128)

Previous code will work on Travis, but error on my Python 3.6.12 :: Anaconda, Inc.

Traceback (most recent call last):
  File "pt2_character_classification.py", line 115, in <module>
    b64_repr = char.encode('base64')
LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs