-
-
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
ImageFont cannot support AppleColorEmoji.ttf on MAC #1422
Comments
Testing, I found that the following sizes work - 20, 32, 40, 48, 64, 96, 160 |
I think that the font only supports those sizes, and so this error is valid. If you disagree, please say so. If you think the error should be a different one, please say so, and the issue can be re-opened. For the moment however, I think there is nothing to do here, and this can be closed. |
Just found the same issue.
Just to be clear, is there any way to make it work with "arbitrary" sizes? |
The FreeType library, which Pillow uses to handle fonts, doesn't allow scaling of bitmap fonts. The only option is to render at a supported size and scale the output yourself. |
The emojis are rendered black and white. Is this intended? It also can't render any normal text ... |
The color support can be fixed with #4955 . |
For anyone interested, you may need to loop through different font sizes to find the correct size to use for the color font. I tried the apple color emoji provided here. It seems that only 137 is the valid size. The following works: unicode_font = ImageFont.truetype(r"E:\AppleColorEmoji.ttf", 137) |
thank you |
I want to convert emoji to a png on MAC, but I failed to create font. My code is below:
I got error below:
The text was updated successfully, but these errors were encountered: