diff --git a/linux/fontconfig/user-bitstream-vera-fonts.conf b/linux/fontconfig/56-emojione-color.conf similarity index 100% rename from linux/fontconfig/user-bitstream-vera-fonts.conf rename to linux/fontconfig/56-emojione-color.conf diff --git a/linux/install.sh b/linux/install.sh index bb1fff9..bc5a584 100755 --- a/linux/install.sh +++ b/linux/install.sh @@ -20,17 +20,18 @@ if [ -z "$XDG_DATA_HOME" ];then fi # Remove font from old directory if exists (temporary backwards compat) -if [ -f ~/.fonts/EmojiOneColor-SVGinOT.ttf ];then - echo "Removing the font from ~/.fonts" - rm ~/.fonts/EmojiOneColor-SVGinOT.ttf +if [ -f $HOME/.fonts/EmojiOneColor-SVGinOT.ttf ];then + echo "Removing the font from $HOME/.fonts" + rm $HOME/.fonts/EmojiOneColor-SVGinOT.ttf fi # Create a user font directory mkdir -p $XDG_DATA_HOME/fonts echo "Installing the font in: $XDG_DATA_HOME/fonts/" cp EmojiOneColor-SVGinOT.ttf $XDG_DATA_HOME/fonts/ + # Create a font config directory -FONTCONFIG=$HOME/.config/fontconfig +FONTCONFIG=$HOME/.config/fontconfig/conf.d mkdir -p $FONTCONFIG # Check for an existing font config if [ -f $FONTCONFIG/fonts.conf ];then @@ -38,7 +39,7 @@ if [ -f $FONTCONFIG/fonts.conf ];then cp $FONTCONFIG/fonts.conf $FONTCONFIG/fonts.bak fi # Install fonts.conf -cp fontconfig/user-bitstream-vera-fonts.conf $FONTCONFIG/fonts.conf +cp fontconfig/56-emojione-color.conf $FONTCONFIG/ echo "Clearing font cache" fc-cache -f diff --git a/linux/uninstall.sh b/linux/uninstall.sh new file mode 100755 index 0000000..d767692 --- /dev/null +++ b/linux/uninstall.sh @@ -0,0 +1,21 @@ +#!/bin/sh +#https://github.com/eosrei/emojione-color-font +echo "Emoji One Color font uninstaller for Linux\n" + +# Stop on errors +set -e +set -v + +# Set XDG_DATA_HOME to default if empty. +if [ -z "$XDG_DATA_HOME" ];then + XDG_DATA_HOME=$HOME/.local/share +fi +FONTCONFIG=$HOME/.config/fontconfig/conf.d + +rm -f $XDG_DATA_HOME/fonts/EmojiOneColor-SVGinOT.ttf +rm -f $FONTCONFIG/fontconfig/56-emojione-color.conf + +echo "Clearing font cache" +fc-cache -f + +echo "Done!"