-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Add Emoji support #1698
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
Add Emoji support #1698
Comments
Hey, no choice, I think you must replace emoji by the corresponding image manually when you build your HTML... I run into the same issue and it seems to be the only choice. It could be great if there is an emoji parser built in dompdf and replace automatically emojis. |
Do you have a font that supports the emoji characters? |
@bsweeney The font https://github.com/googlefonts/noto-emoji/tree/master/fonts "NotoColorEmoji.ttf" supports Emojis but produces an error of missing index |
@simonschaufi seems like something about the font format is incompatible with php-font-lib. As a result there's no character info in the UFM after the font is parsed. I tried a different font, Open Sans Emoji, and the character info is generated but the emoji glyphs still do not render. I suspect the font table containing information for these characters/glyphs isn't currently supported by php-font-lib. This will take some work to fully implement. |
Emoji like 💖 isnt rendered in pdf file 😫😥 Losing original content which is causing inconsistency representation on message like caligraphy product options. |
To clarify this for all users who request this feature: It's not as trivial as it sounds. The font needs to support emojis but as I already wrote before, I tried embedding the NotoColorEmoji font and it didn't work out of the box. |
Definitely something that would need to be added to php-font-lib. Doing a quick (and I mean an "oh here's an article that seems related to this topic) search and it looks like there is definitely work to be done on the php-font-lib side of things (ref). Recommend opening up an issue with that project so it's at least a known request there. I'm not sure if there is additional work that would need to be done with Dompdf, so we'll keep this issue open. |
Is there font-lib in php which support emoji in dompdf rendering ?? anyone who implement can share the process or font-library. |
This seems an ok short term workaround... |
Once dompdf/php-font-lib#140 is released we can review what additional changes may need to be made to Dompdf and/or CPDF to add support. |
hi
i have one issue while i try to print emoji in pdf using encode string so its display white blank string and nothing return any error
i have this type of emoji encoded string
test\uD83D\uDE00\uD83D\uDE00\uD83D\uDE00
so how to print this string in emoji character in pdf please guide how to do this
The text was updated successfully, but these errors were encountered: