Open kerthcet opened 7 years ago
I met the same issue
Do you have an example URL?
Thinks for your response. I want to render http://eosrei.github.io/emojione-color-font/full-demo.html, but no emojis
Yeah, I can confirm that many emojis are not rendered. I guess we need to add some font package with emoji to the Dockerfile (https://github.com/googlei18n/noto-emoji/, https://github.com/eosrei/twemoji-color-font, https://github.com/eosrei/emojione-color-font ?) - though we need to check which works better. Maybe there is also some other font which supports non-color emoji, it can be easier to get working.
Some links:
Likely the following steps are needed:
docker build -t splash .
) - this could take time;docker run -it --rm -p8050:8050 splash
);pull requests are welcome!
Hi, kmike. I worked on screenshots with emojis a few days ago. Now I got some results and want share with you.
Like mentioned above. I searched for some emoji fonts:
So I installed the Noto Color Emoji font on Splash with my Dockerfile. My Dockerfile is just FROM scrapinghub/splash:3.0
and some installing noto color emoji font steps.
Finally I use fc-match
to check font correctly. But I got blank instead of color emojis.
With the some environment. I installed puppeteer in the same docker container. The result was correctly colorful emojis screenshots.
I thought about what the different with Splash and Puppeteer. I read the Splash source code. I realized Splash is using QTWebkit and QTWebView to render images.
So I guess maybe just QTWebView doesn't support color emojis. But I am not familiar with Qt. Could you confirm this probable?
Thanks.
Hi @Edison-Hsu,
Thanks a lot for checking it, this helps!
We're using https://github.com/annulen/webkit fork of QtWebkit, which provides a more recent Webkit version, with many upstream changes. It is possible it doesn't pick up fonts you've installed. There is an issue regarding emoji support (https://github.com/annulen/webkit/issues/185), though I don't know if it just means built-in emoji support, or an option to enable emoji at all.
I think a next step is to confirm it doesn't work for this webkit fork, maybe open an issue in their repo. Maybe instead of building a C++ application using this webkit fork, to confirm an issue, it is possible to try one of the browsers which use this fork (e.g. https://github.com/qutebrowser/qutebrowser with webkit backend; https://github.com/OtterBrowser/otter-browser also seems related, though I don't have experience with them).
Hi @kmike, Thanks a lot.
I will confirm it with that webkit fork and open an issue in their repo.
I can't render emoji with splash on Mac, but PhantomJS works well. How to solve the problem? New to Splash, thanks.