Created
February 27, 2025 11:31
-
-
Save fishd72/b1e738235c75be3d429bcd93d1a30577 to your computer and use it in GitHub Desktop.
This script, based on this source (https://dev.to/darksmile92/get-emojis-working-on-arch-linux-with-noto-fonts-emoji-2a9) should fix emojis showing in apps like Tokodon.
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
#!/bin/sh | |
set -e | |
if [[ $(id -u) -ne 0 ]] ; then echo "Please run as root" ; exit 1 ; fi | |
echo "Setting up Noto Emoji font..." | |
# 1 - install noto-fonts-emoji package | |
pacman -S noto-fonts-emoji --needed | |
# pacman -S powerline-fonts --needed | |
echo "Recommended system font: inconsolata regular (ttf-inconsolata or powerline-fonts)" | |
# 2 - add font config to /etc/fonts/conf.d/01-notosans.conf | |
[[ -e /etc/fonts/local.conf ]] && cp /etc/fonts/local.conf /etc/fonts/local.conf.bak | |
echo "<?xml version=\"1.0\"?> | |
<!DOCTYPE fontconfig SYSTEM \"fonts.dtd\"> | |
<fontconfig> | |
<alias> | |
<family>sans-serif</family> | |
<prefer> | |
<family>Noto Sans</family> | |
<family>Noto Color Emoji</family> | |
<family>Noto Emoji</family> | |
<family>DejaVu Sans</family> | |
</prefer> | |
</alias> | |
<alias> | |
<family>serif</family> | |
<prefer> | |
<family>Noto Serif</family> | |
<family>Noto Color Emoji</family> | |
<family>Noto Emoji</family> | |
<family>DejaVu Serif</family> | |
</prefer> | |
</alias> | |
<alias> | |
<family>monospace</family> | |
<prefer> | |
<family>Noto Mono</family> | |
<family>Noto Color Emoji</family> | |
<family>Noto Emoji</family> | |
<family>DejaVu Sans Mono</family> | |
</prefer> | |
</alias> | |
</fontconfig> | |
" > /etc/fonts/local.conf | |
# 3 - update font cache via fc-cache | |
fc-cache | |
echo "Noto Emoji Font installed! You may need to restart applications like chrome. If chrome displays no symbols or no letters, your default font contains emojis." | |
echo "consider inconsolata regular" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment