Skip to content

Instantly share code, notes, and snippets.

@mzyy94
Last active May 3, 2021 06:01
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save mzyy94/15ee1b3880107e9d7ece 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