importOutlines can't handle some Unicode filenames
tomchen opened this issue · comments
In batch_import_svg.py,
[...]
glyph.importOutlines("SVG\161 ¡.svg")
will raise an error:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa1 in position 8: invalid start byte
This Unicode related issue may, although not exactly, refer to fontforge/fontforge/issues/3058
Initially I wanted to keep the glyph file name as it is to make the file name informative and human readable, but it could indeed raise many Unicode related problems.
So I decided to completely stop using special Unicode file names and changed artboard names in .ai
(and subsequently changed SVG glyph file names), e.g. 305 ı.svg
is now 305 dotlessi.svg
. The file name is less readable this way, but still readable.
See /other_files/font_template-glyph_list-char-dec-filename_table.txt for details. The files are named as
[Decimal_Code] [AGL_Glyph_Name].svg
except for 0-9 whose AGL glyph names are "zero", "one"... but I keep using "0", "1"...
Users should follow the "Update your font_template.ai before 2020-08-19" section in the tutorial.