W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2013

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

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Sat, 23 Feb 2013 19:37:31 -0500
Message-ID: <39f712c04c1f5175e889f201d88fb7de.squirrel@ed-sh-cp3.entirelydigital.com>
To: "Chris Lilley" <chris@w3.org>, "Kazuaki Takemura" <takemura@networksoft.co.jp>, "Jonathan Kew" <jfkthame@googlemail.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>

For future reference

and unzip/decompress it with your default unzipping/decompression
software (mine is Ark version 2.19) in, say,

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
(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
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:


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

Contributions to the CSS 2.1 test suite:

CSS 2.1 Test suite RC6, March 23rd 2011:

CSS 2.1 test suite harness:

Contributing to to CSS 2.1 test suite:
Received on Sunday, 24 February 2013 00:38:07 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:13:25 UTC