Skip to content

Instantly share code, notes, and snippets.

@Athorcis
Created August 4, 2016 22:02
Show Gist options
  • Save Athorcis/60cd5932a4050fe42b8b05b6cab08b63 to your computer and use it in GitHub Desktop.
Save Athorcis/60cd5932a4050fe42b8b05b6cab08b63 to your computer and use it in GitHub Desktop.
#!/bin/bash
mkdir fontcustom-root
pushd fontcustom-root
mkdir fontforge-root
pushd fontforge-root
pacman -S git unzip pkgconfig automake autoconf libtool make patch mingw-w64-x86_64-{gcc,openjpeg2,libtiff,libpng,giflib,freetype,libxml2,python2,pango
git clone https://github.com/fontforge/libspiro.git
pushd libspiro
autoreconf -i
automake --foreign -Wall
./configure
make
make install
popd
git clone https://github.com/fontforge/libuninameslist.git
pushd libuninameslist
autoreconf -i
automake --foreign
./configure
make
sudo make install
popd
git clone https://github.com/fontforge/fontforge.git
pushd fontforge
./bootstrap
./configure
make
make install
popd
popd
wget http://people.mozilla.com/~jkew/woff/woff-code-latest.zip
unzip woff-code-latest.zip -d sfnt2woff
pushd sfnt2woff
patch -b <<EOF
--- woff2sfnt.c
+++ woff2sfnt.c
@@ -40,7 +40,7 @@
#include <string.h>
#include <unistd.h>
#ifdef WIN32
-#include <io.h>
+#include <fcntl.h>
#endif
#include "woff.h"
EOF
make
mv sfnt2woff /usr/local/bin/
popd
gem install fontcustom
popd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment