joypixels / emojione-assets

[Archived] JoyPixels Emoji Assets now maintained at https://github.com/joypixels/emoji-assets.
https://www.joypixels.com
Other
65 stars 13 forks source link

Spritemaps: Put placeholder at coordinates (0,0) #18

Open dbrgn opened 7 years ago

dbrgn commented 7 years ago

The current spritemaps all have a character at position (0, 0). This is problematic when adding CSS classes for an icon that does not exist.

For example, here I tried to create an emoji picker but made a mistake in some of the codepoint classes:

emoji

This results in the first emoji being shown, because there is no offset as defined by the appropriate codepoint class.

While this example is a bit contrived, we had the problem in Threema Web that newer emojis sent by iOS devices would be rendered as policeman because the appropriate emoji was missing:

https://github.com/threema-ch/threema-web/issues/187 https://github.com/threema-ch/threema-web/issues/194 https://github.com/threema-ch/threema-web/issues/199

(The reason was a modifier that was not supported in emojione 2.0...)

To alleviate this issue and to prevent problems with the wrong emoji showing, it would be better to put a placeholder at position (0, 0) of the spritemap, e.g. a light grey square, a box with a quesiton mark, something like that.

kevinranks commented 7 years ago

I like this idea, and we'll add it to our backlog for a future release. Thanks for the input!