Last active
April 29, 2020 09:12
-
-
Save bouroo/50856235c3df2cd9319bb25aa7a4edf2 to your computer and use it in GitHub Desktop.
Install thai fonts for debian, ubuntu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
if [ "$(whoami)" != "root" ]; then | |
SUDO=sudo | |
fi | |
FONT_DIR="/usr/share/fonts/truetype/" | |
TH_FONT="http://cloudbox.3bb.co.th/share3/MTUyNjl8MmZjMDJlOTI1OTU1ZDUxNmEwNGU1NGE2MzNmMDU2MDh8OTY2MTc=" | |
echo "Download Thai Font" | |
#cd ~ && wget -c -O - $TH_FONT | tar zxvf - | |
curl -L --data 'submit_load=loadfile' ${TH_FONT} > thfont.tar.gz | |
tar zxvf thfont.tar.gz || exit 1 | |
sleep 3 | |
echo "Add True Type Fonts" | |
${SUDO} mv -f thfont $FONT_DIR/thfont | |
${SUDO} chmod 644 $FONT_DIR/thfont/* | |
${SUDO} rm -rf thfont.tar.gz | |
${SUDO} fc-cache -fv | |
echo "---Install Thai Font Finish---" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment