https://github.com/akfreas/emoji-extractor-plus
Extract emojis from Apple font in PNG format
https://github.com/akfreas/emoji-extractor-plus
emoji emojis font python
Last synced: 5 months ago
JSON representation
Extract emojis from Apple font in PNG format
- Host: GitHub
- URL: https://github.com/akfreas/emoji-extractor-plus
- Owner: akfreas
- License: gpl-3.0
- Created: 2017-12-14T12:30:43.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2021-04-26T21:18:14.000Z (over 4 years ago)
- Last Synced: 2024-08-04T08:07:53.606Z (about 1 year ago)
- Topics: emoji, emojis, font, python
- Language: Python
- Homepage:
- Size: 27.3 KB
- Stars: 67
- Watchers: 3
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Emoji Extractor Plus โ
Everyone ๐s Emojis. Problem is, it's hard to use them in Photoshop or in Google Slides and Docs. For this reason I created an emoji extractor that takes the PNG data from the Apple font and saves it as an image.
# Usage โ
* Clone this repo
* If you're using [virtualenv](https://virtualenv.pypa.io/en/stable/), make a new env
* Run `python3 -m pip install -r requirements.pip`
* Run `python3 extract.py`This will extract the PNGs from the font file at `/System/Library/Fonts/Apple Color Emoji.ttc`. If you want to target another font file, just use the `--ttc_file` flag with the path to the file.
The script will save the PNG data from the font into the `./images` directory wherever you ran the script. The following resolutions are curretly extracted:
* 160x160
* 96x96
* 64x64
* 52x52
* 48x48
* 40x40
* 32x32
* 26x26
* 20x20All the emojis will be labeled with their proper names, too!

# Fun Info
## Unicode is awesome ๐ฅ
Making this script was a fun exercise in learning more about Unicode and how it's being used to scale the number and types of emojis that Apple is making these days. With the addition of skin tones and gender modifiers, emoji are no longer one Unicode character anymore.
To give an example of one of the more complicated emojis that Apple has created, take ๐จโ๐ฉโ๐งโ๐ง, which comes from the Unicode string `\U0001f468\u200d\U0001f469\u200d\U0001f467\u200d\U0001f467`. (Shown as represented in Python)
This string is broken into several characters:
`\U0001f468`: ๐ฑโโ๏ธ
`\U0001f469`: ๐ฉ
`\U0001f467`: ๐งEach character has a `\u200d` character between it, which is a [zero width joiner](https://emojipedia.org/zero-width-joiner/) in between it. This character is used to join two or more Unicode characters together, in this case the people in the emoji. the ZWG is used also for any modifier, such as skin tone and gender.
My experience before this exercise was mostly with characters that were in the [ASCII table](https://www.asciitable.com/) from the olden days, so exploring this topic with emojis was interesting. Unicode was created to scale to many more characters than could be represented in the ASCII table, which allows it to support not only emojis, but all writing systems.