freetype-py
freetype-py copied to clipboard
About emoji from font file error
Traceback (most recent call last):
File "/freetype-py-master/examples/emoji-color.py", line 17, in
I'm try using python3 on macOS Monterey.
The line is
face.load_char('😀', freetype.FT_LOAD_COLOR)
why is it different from yours? You have made changes to the example.
I have same result
Is your freestype built with libpng? If it isn't, that might be the answer. On Wednesday, 8 June 2022, 18:00:42 GMT+8, yiwangwuqian @.***> wrote:
I have same result
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>
Is your freestype built with libpng? If it isn't, that might be the answer. On Wednesday, 8 June 2022, 18:00:42 GMT+8, yiwangwuqian @.> wrote: I have same result — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.> When i install, i just copy command
pip install freetype-py
and run.
I think we need the result of "otool -L /usr/local/lib/libfreetype.so" or libfreetype.dylib to see if it is linked to libpng or not. Or wherever freetype-py is loading libfreetype.so/dylib from.
Having the same issue here. I'm using macOS 12.4 with Python 3.8. Even reinstall the freetype-py with FREETYPEPY_BUNDLE_FT=1 pip install --no-binary :all: --index-url=https://pypi.org/simple freetype-py
raises the same exception.
If it is a issue with libpng , try grabbing this copy of libfreetype https://github.com/HinTak/Font-Validator/tree/master/bin/Darwin and replace the one installed by pip. It is not the latest, but I did build it with libpng. It was for x86 and x86-64, so it won''t work on an arm-based machine.
As far as I know, freetype-py hasn't included any newer freetype APIs than 2.10 or possibly even 2.8, so the copy of libfreetype built for font validator should support everything that's current in freetype-py. Give it a try.
Thanks!