Skip to content

Instantly share code, notes, and snippets.

@zoeleu
Last active April 2, 2021 20:43
Show Gist options
  • Select an option

  • Save zoeleu/2a5e0b8f2c9c45ec3316e085617b8ce0 to your computer and use it in GitHub Desktop.

Select an option

Save zoeleu/2a5e0b8f2c9c45ec3316e085617b8ce0 to your computer and use it in GitHub Desktop.

Revisions

  1. zoeleu revised this gist Apr 2, 2021. 1 changed file with 2 additions and 4 deletions.
    6 changes: 2 additions & 4 deletions noto-emoji.sh
    Original file line number Diff line number Diff line change
    @@ -39,10 +39,8 @@ echo "<?xml version="1.0"?>
    <family>DejaVu Sans Mono</family>
    </prefer>
    </alias>
    </fontconfig>
    " > /etc/fonts/local.conf
    </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"
    echo "consider inconsolata regular"
  2. zoeleu created this gist Apr 2, 2021.
    48 changes: 48 additions & 0 deletions noto-emoji.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,48 @@
    #!/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
    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"