Are emojis possible in the text element?


So I’m trying to have a text element, with text that also contains an emoji at the end. I was wondering, is displaying emojis possible within playcanvas’ element component?

I saw this and dug through the project a bit Emoji alignment is off with Canvas Font · Issue #2549 · playcanvas/engine · GitHub

But when I tried using the scripts in this project, I get the emoji but without color? It looks like this project is also using .woff font files which don’t generate a font object that can be used in the editor. Is it possible with .otf files? Would I just need to adjust the hex code range or similar?

If it’s not possible I’ll need to find the exact location where the end of the text is and display a small image element to make it look like it’s part of the same text block, but figured I’d ask on here to hopefully avoid doing that.


That project uses a private API that is still in progress to generate glyphs at runtime which is useful for handling user generated content such as usernames. And as you found out, it can be used to show emojis too.

The tradeoff is that it’s not quite perfect (hence the bugs) and it takes more VRAM for textures generated.

You can use TTFs or OTFs but they need to imported into the Editor as binaries which is not currently supported so I ended up using .woff. You can convert to/from .woff pretty easily.

Not sure why your emoji is black and white but it may be due to the font having it’s emojis like that?

Can you share a project that showcases your issue please?