How to add emojis

mr mc textadventure
09 Jul 2020, 15:07I'm copy-pasting emojis into my Quest game, but when I test the game the emojis appear as boxes. Can you please help me insert emojis into the game?
mrangel
09 Jul 2020, 16:04Do they appear correctly in the editor? Is this a problem online, on the desktop player, or both?
Emoji are images stored within a font file, so as far as Quest is concerned they are just letters. They should work fine as long as the font you're using includes them. So it's possible you might need to change the font for them; or some settings in your browser might need changing.

mr mc textadventure
09 Jul 2020, 19:49No, the game is in development in Quest. When I paste the emojis in there, they appear as actual emojis, but when I test it, it just shows a box. I tried different fonts, but the emojis still appear as boxes. This emoji idea comes from 3 AM by ostrichadventurer64 btw.
mrangel
09 Jul 2020, 22:19Is this a problem online, on the desktop player, or both? I can't replicate the problem; they work fine for me. So I'm wondering if it's a problem caused by the old version of Chromium in the desktop version.
Also, have you tried using character entities? For example, 🦊
in a string will appear as 🦊 in the output.

mr mc textadventure
10 Jul 2020, 01:14Can you list the complete list of character entities then?
mrangel
10 Jul 2020, 11:31Here's a link to a table of 1089 of the more common ones. You can either use &#xhex number;
, or ෬imal number;
.
Some emoji have multiple forms; you can choose between 'text style' (same colour as text) or 'emoji style' (coloured emoji) by putting ︎
or ️
immediately after them; but this doesn't work in all browsers and platforms.

mr mc textadventure
10 Jul 2020, 19:57The character entity doesn't work. It still appears as a box.

Pykrete
10 Jul 2020, 21:21I think, Angel, this might be a similar issue to what we ran into getting the grid system working. Emojis like this appearing in text is a fairly recent addition... well, recent in terms of how far back Quest's Chromium version is, anyway.
mrangel
10 Jul 2020, 22:04I thought it might be; that's why I was asking if the issue is desktop or online. Though as far as I can see they should be supported, if you're using a font that has those characters in. (Polyfill - searching alternative fonts to find one that has a specific character - wasn't well-implemented originally)
You may need to explicitly set emoji to display in a font that you know contains the ones you're using.

Pykrete
11 Jul 2020, 17:17If you're unable to find a solution to this, you could take Emojis you want to use, download them/turn them into .png format, and then include them in the working folder of your game project. You could then call them up using {img:filename.png}. If they're of sufficient size, they should work just fine that way.