Skip to content

Instantly share code, notes, and snippets.

@kyohsuke
Created November 9, 2011 09:53
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kyohsuke/1350993 to your computer and use it in GitHub Desktop.
Save kyohsuke/1350993 to your computer and use it in GitHub Desktop.
Auto Build Ricty fonts, But it needs fontforge. It is modified code, that is here: http://d.hatena.ne.jp/yukke112/20110521/1305988867
RICTYURL="http://save.sys.t.u-tokyo.ac.jp/~yusa/fonts/ricty/Ricty-3.1.2.tar.gz"
MIGM1URL="http://sourceforge.jp/frs/redir.php?m=iij&f=%2Fmix-mplus-ipa%2F53389%2Fmigu-1m-20111002.zip"
INCONSURL="http://levien.com/type/myfonts/Inconsolata.otf"
CURDIR=`pwd`
TMPDIR=`mktemp -d`
TMPDIR2=`mktemp -d`
trap "cd $CURDIR; rm -rf $TMPDIR $TMPDIR2" INT HUP QUIT
if [ -z `which fontforge` ]; then
echo 'FontForge is not installed.'
exit 1
fi
echo "----- [File Download]"
cd $TMPDIR
for url in "$RICTYURL" "$MIGM1URL" "$INCONSURL"; do
local fname=`basename $url`
wget "$url"
case $fname in
*.zip)
unzip $fname
;;
*.tar.gz)
tar xzf $fname
;;
*)
;;
esac
done
echo "----- [Find Files]"
ls
find . \( -name '*.sh' -o -name '*.?tf' \) -exec cp {} $TMPDIR2 \;
cd $TMPDIR2
echo "----- [Execute Files]"
ls
sh ricty_generator.sh Inconsolata.otf migu-1m-regular.ttf migu-1m-bold.ttf
cp -f Ricty-*.ttf $CURDIR
cd $CURDIR
rm -rf $TMPDIR $TMPDIR2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment