Skip to content

Instantly share code, notes, and snippets.

@show555
Forked from mzyy94/osmc-jp-font-replace.sh
Created March 30, 2018 14:32
Show Gist options
  • Save show555/1b761a33177946858305c762988ffd42 to your computer and use it in GitHub Desktop.
Save show555/1b761a33177946858305c762988ffd42 to your computer and use it in GitHub Desktop.
OSMC Japanese font replace
#!/bin/sh
URL="https://gist.github.com/mzyy94/15ee1b3880107e9d7ece/download"
TMP="/tmp/mplusfonts"
FONTSDIR="/usr/share/kodi/addons/skin.osmc/fonts/"
FONTCONF="/usr/share/kodi/addons/skin.osmc/16x9/Font.xml"
set -x
mkdir -p ${TMP}
wget ${URL} -O - | tar -zxvC ${TMP}
find ${TMP} -name "*.tar.gz" -exec tar -zxvf {} -C ${TMP} \;
find ${TMP} -name "mplus-1[cp]-*.ttf" -exec cp {} ${FONTSDIR} \;
sed -i.bak -e 's/-Semibold/-medium/' -e 's/OpenSans/mplus-1p/' -e 's/Roboto/mplus-1c/' -e 's/-\([A-Z]\)/-\L\1/' ${FONTCONF}
rm -rf ${TMP}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment