Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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