memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

Question Regarding UTF-16 emojis #617

Closed orange451 closed 3 years ago

orange451 commented 3 years ago

I read that NanoVG font rendering expects UTF-8 formatted text. However, most emojis are UTF-16. Take for example, the poop emoji: \uD83D\uDCA9 how can this be rendered within NanoVG? I tried loading in the font NotoColorEmoji, but when trying to draw the above character, nothing is drawn. UTF-8 characters render totally fine, however.

mulle-nat commented 3 years ago

https://onlineutf8tools.com/convert-utf16-to-utf8