1.2.1 โ€ข Published 4 years ago

emojiimages v1.2.1

Weekly downloads
2
License
MIT
Repository
-
Last release
4 years ago

๐Ÿ™ˆ Emoji Images

npm version

Images (200x200) for all emojis in Unicode v13.1 (Date 2020-08-31) and some composite emojis in supplement.txt such as ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ, rendered with Apple Color Emoji font in Mac OS.

NOTE: Some emojis are not supported by the Apple Color Emoji font.

  • Unicode v13.1 contains 2192 emojis, 2127 are supported.
  • supplement.txt contains 125 emojis, 124 are suppoted.
  • So we get 2127 + 124 = 2251 emoji images in total!

npm.io

Install

$ yarn add emojiimages
$ ls node_modules/emojiimages/imgs
00a9.png         1f4a1.png       1f61c.png                    1f510.png
00ae.png         1f4a2.png       1f61d.png                    1f511.png
002a-20e3.png    1f4a3.png       1f61e.png                    1f512.png
0023-20e3.png    1f4a4.png       1f61f.png                    1f513.png
0030-20e3.png    1f4a5.png       1f62a.png                    1f514.png
0031-20e3.png    1f4a6.png       1f62b.png                    1f515.png
...

Usage

All the images are in the imgs directory with unicode code points as the filename.

const punycode = require("punycode")
const char = "๐Ÿค’"
const filename = punycode.ucs2.decode(char).map(num => num.toString(16)).join("-") + ".png"
// Now we can get the emoji using this path
const filepath = `node_modules/emojiimages/imgs/${filename}`

Generate

All the images are rendered by the browser. If you want emoji images in different size, follow these steps:

  • Clone this repo and install dependencies ๐Ÿš€
  • Start a local server and open generator.html ๐Ÿ–ฑ
  • Adjust the params โš™
  • Click Download to download a preview image ๐Ÿค“
  • If everything is ok, click Download All to download all 2000+ images in on zip file ๐Ÿ˜† (notice, this is gonna take a few minutes, just be patient)
  • Manually recognize and delete the images which are not supported by the font ๐Ÿ˜ญ (I hate to say this, but I couldn't find a way to reliably detect which emojis are not supported.)
  • Compress the generated png images (optional) ๐Ÿ™ƒ
  • And you are done! ๐ŸŽ‰