woff-code-latest.zip from http://people.mozilla.com/~jkew/woff/Then, unzip/decompress the file
woff-code-latest.zip with your default
unzipping/decompression software (mine is Ark version 2.19) in, say,
~/Documents/woff-code-latest
In your package manager (mine is Muon Package Manager version 2.2.0),
make sure you have installed
gcc package
and gcc-4.7
package and zlib1g-dev package and
possibly a few other dependent packages (like
make and libc6
packages); if not, then download and install them.
~/Documents/woff-code-latest$ ls Makefile sfnt2woff.c woff-2009-10-03.html woff2sfnt.c woff.c woff.h woff-private.h
You should see those 7 files.
sfnt2woff
executableThen in your command-line terminal (mine is Konsole), do:
~/Documents/woff-code-latest$ make cc -c -o sfnt2woff.o sfnt2woff.c cc -c -o woff.o woff.c cc -o sfnt2woff sfnt2woff.o woff.o -lz cc -c -o woff2sfnt.o woff2sfnt.c cc -o woff2sfnt woff2sfnt.o woff.o -lz
Then do:
~/Documents/woff-code-latest$ ls -al
The sfnt2woff executable
should be listed along with execution rights for group and user.
Then move or copy the source foo.ttf
font (the .ttf file you want to convert into an .woff file) into
~/Documents/woff-code-latest
and then do:
./sfnt2woff foo.ttf
and then foo.woff should be created
and its filesize should be (moderately or considerably) smaller than
foo.ttf .
The "./" prefixing the executable is important unless you have modified/added the /woff-code-latest directory to your $PATH.
More info: http://askubuntu.com/search?q=modify+$PATH+add+directory
There. Done!
Many thanks to Johnathan Kew, Chris Lilley and Kazuaki Takemura for their assistance.