Closed fpagyu closed 4 years ago
:white_check_mark: Build freetype-py 1.0.128 completed (commit https://github.com/rougier/freetype-py/commit/a215145392 by @)
Thanks
There are some other problems. It works well on my ubuntu. But running on macos, it raise FT_Exception:
import freetype
face = freetype.Face("msyh.ttf")
face.set_pixel_sizes(0, 30)
slot = face.glyph
glyph = slot.get_glyph()
glyph.get_cbox(freetype.FT_GLYPH_BBOX_SUBPIXELS)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/yufpga/proj/venv/lib/python3.6/site-packages/freetype/__init__.py", line 793, in get_cbox
if error: raise FT_Exception(error)
freetype.ft_errors.FT_Exception: FT_Exception: (unknown file format)
Is it specific for this font ?
I tried different font, get the same result.
see issue: https://github.com/rougier/freetype-py/issues/35
FT_Glyph_Get_CBox function in c (freetype: src/base/ftglyph.c):
receive glyph with FT_Glyph type, but you send byref(self._FT_Glyph) with *FT_Glyph type.