Developer access to Unicode PUA's

While looking for the robux .svg files and ways to implement custom emojis, I found this buried in the release notes for 541:

This led me to believe that giving developers access to Unicode PUA’s would be feasible, perhaps through a service-type api or an instanced system similar to how MaterialService works

--- adds `rbxassetid://` emoji to the experience in runtime
EmojiService:RegisterEmoji(Name: string, AssetId: string): ()

--- returns string `utfCodepoint` of emoji registered by `RegisterEmoji()`
EmojiService:GetEmojiCodepoint(Name: string): string

--[[
...
or an "Emoji" instance that has its own properties like .AssetId, .Name, etc
and a read-only .Codepoint property that is assigned within the unicode PUA range
]]

…regardless of how this feature is implemented, it would allow developers freedom to embed their own custom emojis into text strings without having to rely on workarounds like prepending/appending an ImageLabel to a TextLabel

EmojiService:RegisterEmoji("InGameCurrency1", "rbxassetid://1234567890") --- this is like a "coins" currency
local Codepoint = EmojiService:GetEmojiCodepoint("InGameCurrency1") --- "\u{Ewxyz}"
local ItemCost = 9999

...
TextLabel.Text = `{CodePoint} {ItemCost}` --- $ 9999

...
local PlayerChatMessage = "i cant believe the price was raised to :Currency1: 10000!!!"
PlayerChatMessage:gsub(":Currency1:", CodePoint) --- could be passed into something like the ChatService callback
15 Likes

Would be great if this was a thing; the API would be better if :RegisterEmoji returned the codepoint instead of using getters/setters.

2 Likes

Imagine being able to refer to ingame currencies by their symbol in chat. No idea how this would look in user facing UI though. Perhaps integrated into a general emoji picker.

5 Likes

This is a really good idea. It might take a little technical legwork to implement but this would be wonderful not just for saving developer time, but even for expanding player chat capabilities with really good custom emoji support.

6 Likes

custom emojis would be sooooo good for communication, like how :skull: and :nerd_face: are universally understood concepts

this was actually the main reason why i wrote this feature request, because i wanted to be able to easily communicate the behavior of certain (sometimes complex) actions without producing a wall of text that no one would bother reading

from personal experience, crossing language barriers is super easy when there exists an easily-communicable symbol that all actors/players, regardless of lingual background, can instantly identify and relate to

1 Like

yeah, but how would we add animated characters? that’d be useful too!