-
-
Notifications
You must be signed in to change notification settings - Fork 710
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
Emojis are not being displayed #1768
Comments
Hi! It works for me. Could you please share the generated PDF where the emoji is missing? If it’s also possible to include emojis that work, it could be useful. |
Here's the PDF when rendered on my side: Here's another template with 3 emojis, the wine and two different smiling emojis - only one works: |
It looks like there’s no emoji font installed (or at least found) on your system. The only emoji that works is one of the few included in DejaVu. Do you have a font like Noto-Emoji installed? |
Well spotted, thanks! That was it indeed. Having installed Noto-Emoji Color, I encounter another issue with some emojis (namely with the string 🍷🍷🍷✅): Message: 'Relative URI reference without a base URI: <%s %s="%s">' Removing the emoji string above from a document makes it render again. |
It works here with Noto-Emoji: emoji.pdf Your error happens when an relative URL is used without a base URL, and I have no idea how you could have that with emojis. Maybe you tried to install a SVG-based emoji font (such as Twemoji) that includes a |
Thanks Guillaume, it appears your guess is on point. I had downloaded the Noto Color Emoji font from Google fonts (https://fonts.google.com/noto/specimen/Noto+Color+Emoji) which caused the issue. Using the color font from the Github repo I did not encounter the issue: https://github.com/googlefonts/noto-emoji |
I can actually reproduce the bug with Noto from Google fonts, it looks like it uses SVG images with |
Allowing relative links when drawing emojis fixes the problem: emoji.pdf But some of Noto’s glyphs are broken: they are HUGE (~15MB) and include A LOT of So… Let’s consider this bug as closed with the fix, and let’s hope that Noto will be fixed soon. If anyone is interested in reporting a bug to Google, don’t hesitate to do so! |
WeasyPrint v57.1
Example code:
Expected: PDF shows wine glass emoji
Actual: PDF shows white space where the emoji should be
The text was updated successfully, but these errors were encountered: