[solved] How to create a .woff file with sfnt2woff under Linux [U|Ku|Xu|Lu]buntu

For future reference
--------------------

Download
woff-code-latest.zip
from
http://people.mozilla.com/~jkew/woff/
and unzip/decompress it 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 1.9.80),
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.

Then in your command-line terminal (mine is Konsole), do:

~/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)

then 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

~/Documents/woff-code-latest$ ls -al
should list sfnt2woff executable 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.

Many thanks to Johnathan Kew, Chris Lilley and Kazuaki Takemura for
their assistance.

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 Test suite RC6, March 23rd 2011:
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

CSS 2.1 test suite harness:
http://test.csswg.org/harness/

Contributing to to CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Sunday, 24 February 2013 00:38:07 UTC