Select to view content in your preferred language

How to get unicode emojis to appear correctly in labels in Pro (they work fine in AGOL)?

2809
4
Jump to solution
11-14-2019 02:50 PM
JimmyKnowles
Frequent Contributor

I've got an Arcade expression for labels that works fine in AGOL, but when I try the same thing in Pro, only certain unicode emojis display correctly. Anybody have any ideas on getting them to display correctly?

Here's an abbreviated version of the expression:

var code = $feature.behavior1;
var decodedValue = Decode(code,
'Active Nest','★-',
'Agitated','',
'Calling','',
'');

Concatenate(['T', $feature["ter_id"], '|' ,decodedValue, '|', ' (' , $feature.OBJECTID,')'])

The emojis show up fine in the Arcade Expression box

Here are how things look in AGOL:

And how they look in Pro, some emojis show up fine, but others show up as just a little box:

I've tried changing fonts and some other Label Class properties, but nothing has helped.

I've added the hosted feature layer to a map in Pro, symbology comes in fine, but the labels are shown as above. I also downloaded a fgdb and applied the same label expression to the fgdb feature class and get what is seen above.

Pro version is 2.4.2.

Thanks.

0 Kudos
1 Solution

Accepted Solutions
ShaunWalbridge
Esri Regular Contributor

Can you see if your emoji symbols work when you set the font to Segoe UI Emoji?

Cheers,

Shaun

View solution in original post

4 Replies
ShaunWalbridge
Esri Regular Contributor

Can you see if your emoji symbols work when you set the font to Segoe UI Emoji?

Cheers,

Shaun

JimmyKnowles
Frequent Contributor

Shaun, that did the trick. Thanks for your help.

Does that mean that I'm restricted to that font if I want to use emojis in labels in Pro?

0 Kudos
ShaunWalbridge
Esri Regular Contributor

You should be able to use any font which contains the full set of emoji characters you're using. I'm not sure why font substitution isn't happening to find the emoji characters for your other font choices, that may be a bug, but I'm not a labeling expert (I can ask around if this is something you'd like to know more about). The other option is that you use marker symbols for the elements you're looking for -- both SVG and gITF are supported input formats:

  Marker symbol layers—ArcGIS Pro | Documentation 

For SVG for example, there are many open source collections of emoji symbols as SVG files. See for example some of the collections listed on this page:

  Emoji - Wikimedia Commons 

You could then download e.g. Twitters' twemoji set, and pull out the individual SVG files you need for each type, and use that for your symbols. This will give you some greater control than just using the Windows text renderer to select the emoji, though does take a few more steps.

0 Kudos
JimmyKnowles
Frequent Contributor

Shaun, thanks for your follow-up response. I was more curious why it wasn't working since it seems that those emoji characters are supported in general in Pro (demonstrated by the fact that they show up fine in the Arcade expression box). I don't think I'll be using it this much so the use of the Segoe UI Emoji font will likely be enough, no need to ask around.

If I do need more functionality, I'm glad to know that some good alternatives exist for using emojis as you described. Doing it in the label was nice since we could combine the emoji with other information.

0 Kudos