使用 Python 3.6 CAM->Generator->Text 失败并在状态行中显示以下消息(stdout 上没有错误): “Text abort: That’s embarrassing, I can’t read this font file!”
希望以下信息有所帮助:
Python3
Python 3.6.11 (default, Dec 24 2020, 19:28:34)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ttf
>>> font = ttf.TruetypeInfo("/usr/share/fonts/dejavu/DejaVuSans.ttf")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/kestas/.local/lib64/python3.6/site-packages/bCNC/lib/ttf.py", line 151, in __init__
_read_head_table(self._data, self._tables['head'].offset)
KeyError: 'head'
>>>
蟒蛇2
Python 2.7.15 (default, Nov 13 2019, 20:30:33)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import ttf
>>> font = ttf.TruetypeInfo("/usr/share/fonts/dejavu/DejaVuSans.ttf")
>>>
使用 Python 3.6 CAM->Generator->Text 失败并在状态行中显示以下消息(stdout 上没有错误):
“Text abort: That’s embarrassing, I can’t read this font file!”
希望以下信息有所帮助:
Python3
蟒蛇2