freetype-py icon indicating copy to clipboard operation
freetype-py copied to clipboard

About emoji from font file error

Open yiwangwuqian opened this issue 2 years ago • 9 comments

Traceback (most recent call last): File "/freetype-py-master/examples/emoji-color.py", line 17, in face.load_char('😀') File "/usr/local/lib/python3.9/site-packages/freetype/init.py", line 1547, in load_char if error: raise FT_Exception( error ) freetype.ft_errors.FT_Exception: FT_Exception: (unimplemented feature)

I'm try using python3 on macOS Monterey.

yiwangwuqian avatar Jun 02 '22 02:06 yiwangwuqian

The line is

face.load_char('😀', freetype.FT_LOAD_COLOR)

why is it different from yours? You have made changes to the example.

HinTak avatar Jun 02 '22 14:06 HinTak

image I have same result

yiwangwuqian avatar Jun 08 '22 10:06 yiwangwuqian

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: @.***>

HinTak avatar Jun 08 '22 11:06 HinTak

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.

yiwangwuqian avatar Jun 10 '22 03:06 yiwangwuqian

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.

HinTak avatar Jun 14 '22 16:06 HinTak

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.

huntzhan avatar Aug 01 '22 13:08 huntzhan

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.

HinTak avatar Aug 01 '22 15:08 HinTak

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.

HinTak avatar Aug 01 '22 18:08 HinTak

Thanks!

huntzhan avatar Aug 02 '22 05:08 huntzhan