Last active
June 3, 2021 13:31
-
-
Save Xetera/54bff405e8af17cc742ee33a28b53909 to your computer and use it in GitHub Desktop.
Adding emoji support to the netlify build process, used for taking screenshots with puppeteer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
#check if font is installed | |
fc-match "Noto Color Emoji" | |
#if not installed install with following line | |
apt-get install fonts-noto-color-emoji -y | |
curl -L https://noto-website-2.storage.googleapis.com/pkgs/NotoColorEmoji-unhinted.zip -o NotoColorEmoji.zip | |
unzip NotoColorEmoji.zip | |
mkdir "$HOME/.fonts" | |
mv NotoColorEmoji.ttf "$HOME/.fonts" | |
cat << EOF > "$HOME/.fonts.conf" | |
<?xml version="1.0"?> | |
<!DOCTYPE fontconfig SYSTEM "fonts.dtd"> | |
<fontconfig> | |
<alias> | |
<family>sans-serif</family> | |
<prefer> | |
<family>Noto Color Emoji</family> | |
<family>Noto Emoji</family> | |
</prefer> | |
</alias> | |
<alias> | |
<family>serif</family> | |
<prefer> | |
<family>Noto Color Emoji</family> | |
<family>Noto Emoji</family> | |
</prefer> | |
</alias> | |
</fontconfig> | |
EOF | |
fc-cache -fv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment