replit / kaboom

💥 JavaScript game library
https://kaboomjs.com
MIT License
2.67k stars 226 forks source link

Fix emoji display in text #771

Closed luluxia closed 1 year ago

luluxia commented 1 year ago

Native String split() can't handle emoji in strings correctly so it causes emoji display exception in text component. I added a library to fix this.

image

luluxia commented 1 year ago

If you set a color for the text, it causes the emoji to be covered by the color, which feels illogical. I made a few more changes so that the color option wouldn't work for emoji characters.

slmjkdbtl commented 1 year ago

Thank you this is a very nice feature! I'll take a closer look tomorrow.

slmjkdbtl commented 1 year ago

Is there an existing library you're referencing from?

luluxia commented 1 year ago

Is there an existing library you're referencing from?

yes. the code is from here https://github.com/bluelovers/runes

slmjkdbtl commented 1 year ago

It seems legit, gonna merge now.