-
Notifications
You must be signed in to change notification settings - Fork 75
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
Is it possible to use NotoColorEmoji.ttf? #81
Comments
The NotoColorEmoji font cannot be used because the font outlines are not stored in the standard TrueType glyph font table but in a separate, special font table that supports colors. And this special table is not supported by ttfunk. In short: It is not possible to use a font with colored glyphs with ttfunk. |
Thanks @gettalong. I guess that must be why I keep seeing recommendations of using Japanese fonts (which I am also doing, but many emojis are not supported). |
I'm still struggling with this. is there any chance there will eventually be support? Thanks! |
The reason why this is not that easy to support are manyfold. For example,
So your best bet would be to do the Emoji parsing yourself, output the text before, output the emoji (taken from a list of images extracted from the font), output the text after. You might want to look at asciidoctor-pdf which has implemented support for inline images. Generally, that codebase extends Prawn in many ways and is a good resource to find solutions to common text layout problems. It is rather huge, though. |
Thank you for that excellent information @gettalong. I suspect that https://github.com/hidakatsuya/prawn-emoji probably implements a solution like you are describing. Unfortunately, it is unusable because of this issue. I'm actually blown away that nobody has solved this yet. It is safe to say that I currently don't have nearly the knowledge needed to solve it myself. Thanks again for entertaining my question! |
I'm trying to get emoji rendering working, and I'm failing. I'm trying to use NotoColorEmoji.ttf and I am experiencing this error:
Here is my list of fallback fonts:
All of the other fonts work, but many of the emojis just render as boxes.
Any points on either another way, or getting this font to work, would be appreciated. Thanks!
The text was updated successfully, but these errors were encountered: