Skip to content

Instantly share code, notes, and snippets.

@creaktive
Last active January 6, 2019 13:09
Show Gist options
  • Star 17 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save creaktive/5004950 to your computer and use it in GitHub Desktop.
Save creaktive/5004950 to your computer and use it in GitHub Desktop.
Terminus Powerline for Mac OS X
# http://www.ax86.net/2010/08/28/generate-your-own-ttf-versions-of-the-terminus-font
# http://hp.vector.co.jp/authors/VA013651/freeSoftware/mkbold-mkitalic.html
# https://pypi.python.org/pypi/bdflib
# http://mbauman.net/geek/2009/03/15/minor-truetype-font-editing-on-a-mac/
apt update
apt upgrade -y
apt install -y fontforge git potrace python-fontforge python-pip rename wget
pip install bdflib
wget http://hp.vector.co.jp/authors/VA013651/lib/mkbold-mkitalic-0.11.tar.bz2
tar xjvf mkbold-mkitalic-0.11.tar.bz2
cd mkbold-mkitalic-0.11/
make install
cd ..
git clone https://github.com/Tblue/mkttf.git
cd mkttf/
wget https://downloads.sourceforge.net/project/terminus-font/terminus-font-4.47/terminus-font-4.47.tar.gz
tar xzvf terminus-font-4.47.tar.gz
cd terminus-font-4.47/
mv ter-u12b.bdf{,.bak}
bdflib-embolden --ignore-spacing ter-u12b.bdf{.bak,}
wget https://github.com/Lokaltog/vim-powerline/raw/develop/fontpatcher/PowerlineSymbols.sfd
wget https://github.com/Lokaltog/vim-powerline/raw/develop/fontpatcher/fontpatcher
ls *.bdf | xargs -n1 python fontpatcher --no-rename
rename -f 's/-Powerline-\d+//' *.bdf
cd ..
./mkttf.sh terminus-font-4.47 4.47 terminus Terminus
#ftxdumperfuser -t hhea -A d *.dfont
#perl -i.bak -pe 's/\b(lineGap=)"\d+"/$1"0"/' *.xml
#ftxdumperfuser -t hhea -A f *.dfont
@henricavalcante
Copy link

apt-get for OSX?

@drew1kun
Copy link

Seems like apt-get is available for iOS only… not for OSX… But this script is for linux to make fonts which work on osx…
Thanx for fonts btw! Really cool!!!!

@creaktive
Copy link
Author

creaktive commented Jan 6, 2019

FWIW, I've finally got around to it and made a Dockerfile for this:

git clone https://github.com/creaktive/mkttf.git
cd mkttf/
docker build -t mkttf .
docker run -v "$PWD:/mkttf" --env TERMINUS_VERSION=4.47 mkttf
ls *.zip
# terminus-ttf-4.47-mac.zip terminus-ttf-4.47-windows.zip terminus-ttf-4.47.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment