msokk / electron-render-service

Microservice for rendering PDF/PNG/JPEG from HTML with Electron
MIT License
102 stars 31 forks source link

unicode support emoji (unicode <= v10) #65

Closed AubreyHewes closed 6 years ago

AubreyHewes commented 6 years ago

Support unicode emoji up to latest official v10 (https://emojipedia.org/unicode-10.0/)

Problem

When running within the docker container it will support (currently) at most v6 (and not even complete v6 support)

Test https://emojipedia.org/unicode-6.0/ via the docker container and search hundred and any button..

Dev/Testing Caveat

When running locally the application has access to the local OS fonts and so will probably support emoji-unicode till ^v10 (this is a dev / testing caveat).

Solution

This fix is for the docker container.

This adds support for emoji unicode including v10 (via Symbola). The latest Symbola font is included as the upstream is outdated.

Try via docker container http://DOCKER-IP:3000/pdf?accessKey=dev&url=%s

msokk commented 6 years ago

Hi, thanks. I'll try to merge this in the evening. I've been wanting to do a 1.0 release for some time.

Btw, what was the docker warning? Dockerfile already had shell command line break characters.

AubreyHewes commented 6 years ago

Hi @msokk

docker build warns on the empty line without a line break char (though is not a real problem)

Maybe a better 1.0 release would be to use debian:stretch as a base image and also add asian, arabic, hebrew fonts for a better character coverage? Or is outside the scope of this project?

msokk commented 6 years ago

Sure, if rendering works okay with stretch. I'm happy to increase font coverage, I'm not currently pushing for image size. Question is what font packages? https://packages.debian.org/source/stretch/fonts/ https://packages.debian.org/contrib/stretch/fonts/

msokk commented 6 years ago

Released this - https://github.com/msokk/electron-render-service/releases/tag/1.0.0