Python and shell scripts to backport and theme Apple Color Emoji font.
- Bash version 5+ (
brew install bash
) - Python 3.7 or later
- pip
- fonttools (
pip3 install fonttools[repacker]
) - afdko (
pip3 install afdko
) - libpylzfse (
pip3 install libpylzfse
) - Pillow (
pip3 install Pillow
) - pngquant (
brew install pngquant
) - oxipng (
brew install oxipng
)
- ImageMagick (
brew install freetype imagemagick
) - librsvg (
brew install librsvg
) - svgo (
brew install svgo
)
- Copy
Apple Color Emoji.ttc
from/System/Library/Fonts
of your macOS instance to the root of this repository and rename it toAppleColorEmoji_macOS.ttc
. - Copy AppleColorEmoji font from your iOS instance to the root of this repository and rename it to
AppleColorEmoji_iOS.ttc
. Read here for the exact file path. - Apply this patch and this patch to
sbixGlyph.py
of yourfonttools
library. - Execute
prepare.sh
to create emoji TTF files and tables. Run this once.
Execute ./apple.sh HD
, you will get [email protected]
(for iOS 10 and above) and [email protected]
(for iOS 9 and below) under apple
directory.
EmojiFonts deals with certain font tables; mainly GDEF
and sbix
.
shift-multi.py
resizes and shifts the multi-skinned emojis that pair up as one, including couples and handshake, to have them displayed on iOS 13 and below correctly where there is no render logic to automatically place the pair close together.
GDEF
table which maps each of paired emojis to a certain class, is modified by the scripts. This is for the easiest backward-compatible solution for the emoji font. In this table, emojis with class 1
and 3
represent left
and right
, respectively. With those present, the text render engine on iOS 14+ will try to place the pair close together again even when we applied shift-multi.py
to the font. Another script remove-class3.py
ensures that there are no class 1
and 3
emojis that will otherwise be visible to the users.
extractor.py
extracts PNG emoji images from the font. This opens up the possibility to theme the emoji font.
pngquant
and oxipng
are used to optimize the images with little to none changes to the quality. The Apple emoji font sizes are reduced by 50% using this method. The simpler the emoji images, the more size reduction is achieved.
Theming scripts for all emojis vendors produce the font in TTC format. The font may be used by EmojiFontManager iOS tweak, and is guaranteed to work on iOS 6 and higher. Ensure that you executed ./apple.sh HD
before following instructions below.
It is recommended to limit the depth of clone to 1
(git clone --depth 1 REPO-URL
) because the repository size is usually big.
- Clone blobmoji and place its folder alongside this project.
- Execute
cd blobmoji && ./blobmoji.sh
to create themed font, output atblobmoji/blobmoji.ttc
.
- Clone facebook-emojis and place its folder alongside this project.
- Execute
cd facebook && ./facebook.sh
to create them themed font, output atfacebook/facebook.ttc
.
- Clone fluentui-emoji and place its folder alongside this project.
- Execute
cd fluentui && ./fluentui.sh STYLE
(whereSTYLE
is one of this list:Color, Flat, High Contrast
) to create themed font, output atfluentui/fluentui-STYLE.ttc
.
- Clone noto-emoji and place its folder alongside this project.
- Execute
cd noto-emoji && ./noto-emoji.sh
to create the themed font, output atnoto-emoji/noto-emoji.ttc
.
- Download JoyPixels 7 Free assets from JoyPixels Download page and place the folder alongside this project.
- Execute
cd joypixels && ./joypixels.sh
to create themed font, output atjoypixels/joypixels.ttc
.
- Clone openmoji and place its folder alongside this project.
- Execute
cd openmoji && ./openmoji.sh
to create themed font, output atopenmoji/openmoji.ttc
.
- Retrieve
NotoColorEmoji.ttf
with Samsung One UI 5.0 emojis somehow and place that inoneui
folder. - Execute
cd oneui && ./oneui.sh
to create themed font, output atoneui/oneui.ttc
.
- Download
TossFaceFontMac.ttf
from tossface website and place that intossface
folder. - Execute
cd tossface && ./tossface.sh
to create themed font, output attossface/tossface.ttc
.
- Clone twemoji and place its folder alongside this project.
- Execute
cd twemoji && ./twemoji.sh
to create the themed font, output attwemoji/twemoji.ttc
.
- Retrieve
NotoColorEmoji.ttf
with WhatsApp emojis somehow and place that inwhatsapp
folder. - Execute
cd whatsapp && ./whatsapp.sh
to create themed font, output atwhatsapp/whatsapp.ttc
.