Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

unicodeToImage class does not match PNG filename #484

Closed
dbrgn opened this issue Apr 25, 2017 · 5 comments
Closed

unicodeToImage class does not match PNG filename #484

dbrgn opened this issue Apr 25, 2017 · 5 comments

Comments

@dbrgn
Copy link

dbrgn commented Apr 25, 2017

When using spritemaps:

> emojione.unicodeToImage('☹️')
"<span class="e1 e1-people _2639-fe0f" title=":frowning2:">☹️</span>"

The codepoint used in the class name is 2639-fe0f, but the filename of the corresponding emoji PNG from the download archive is just 2639.png. When generating spritemaps based on the name, the two don't match.

It would be good if the two would match. Otherwise they have to be mapped manually, which is probably not the intent of this library.

(PS: Did you change the class name prefix from emojione- to _ on purpose?)

@caseyahenson
Copy link
Contributor

@dbrgn thanks for pointing this out! I see the issue here and I'll get it fixed soon. We made a number of changes to the sprite structure with 3.0, the naming pattern you show above is not quite accurate but the new class specification is intentional. One class specifies the category and size, e.g. emojione-32-people and another specifies the file name, e.g. _2639.

On a related note, we'll also be adding the option to set the sprite size as either 32 or 64, which will be available soon.

@dbrgn
Copy link
Author

dbrgn commented Apr 25, 2017

the naming pattern you show above is not quite accurate

Yes, sorry, I renamed emojione and emojione-32 to e1 to make the spritemap CSS file smaller.

On a related note, we'll also be adding the option to set the sprite size as either 32 or 64, which will be available soon.

I generated the spritemap myself by tweaking the config files from the v2 version, but if you're officially supporting them with v3 (for the 32x32 version), then that's even better :)

@dbrgn
Copy link
Author

dbrgn commented May 1, 2017

Any ETA on this? :)

@caseyahenson
Copy link
Contributor

The patch for this should be released today.

@caseyahenson
Copy link
Contributor

@dbrgn this is fixed in 3.0.2, released today.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants