-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to use NotoColorEmoji: invalid pixel size #6166
Comments
|
Google has proposed a new scalable format for colored fonts, COLR v1. An experimental version of Noto Color Emoji should be available here: https://github.com/googlefonts/color-fonts Edit: I think there is also an SVG version somewhere, FreeType has just added support for SVG fonts, but the required callbacks aren't added to Pillow yet: #6170 |
No, from what I can see, "an experimental interface" was added in 2.11.0. @jdhao you liked the previous comment. Has this answered your question? |
@radarhere The ultimate goal is to use the color emoji font as expected. Judging from the comment, this is not possible for now? My upvote is just for the clarification 😂 |
Okay, based on code this pr, I figured out. We need to change font size to exactly 109, then it should be fine. from PIL import ImageFont
FONT_PATH = './NotoColorEmoji.ttf'
font_size = 109
font = ImageFont.truetype(FONT_PATH, size=font_size) |
What did you do?
I am trying to use NotoColorEmoji font from here.
Here is my code:
What did you expect to happen?
I can open the font without error.
What actually happened?
I am seeing the following error:
What are your OS, Python and Pillow versions?
The text was updated successfully, but these errors were encountered: