tkrkt / text2png

text-to-png generator for Node.js
MIT License
188 stars 50 forks source link

Doesn't do unicode/emoji? #6

Open NoobDoesMC opened 6 years ago

NoobDoesMC commented 6 years ago

Just tried rendering 🔥 but it gives this instead:

screen shot 2018-02-17 at 13 53 20

NoobDoesMC commented 6 years ago

It also didn't do 中文

中文 became screen shot 2018-02-17 at 15 22 24

tkrkt commented 6 years ago

I also confirmed same behavior, but it is hard for text2png to fix.

text2png depends on node-canvas, it depends on cairo. Stable version of cairo(1.14.12) probably does not support emoji...

On the other hand, development version of cairo(1.15.8) supports emoji.

https://cairographics.org/news/cairo-1.15.8/

Features and Enhancements ------------------------- * Support colored emoji glyphs, stored as PNG images in OpenType fonts.

If you get and build the development version of cairo, you may be able to use emoji. (I have not tried it yet)

beniper commented 5 years ago

@tkrkt is there a way to update the package to support emoji?

Thanks