tree: 4eb53706818880e37d35209e192bf1ea8df584c7 [path history] [tgz]
  1. .gitignore
  4. Makefile
  6. README.chromium
  8. src/
  9. woff2.gyp

´╗┐This is a README for the font compression reference code. There are several compression related modules in this repository.

brotli/ contains reference code for the Brotli byte-level compression algorithm. Note that it is licensed under an Apache 2 license.

src/ contains the C++ code for compressing and decompressing fonts.

Build & Run

This document documents how to run the compression reference code. At this writing, the code, while it is intended to produce a bytestream that can be reconstructed into a working font, the reference decompression code is not done, and the exact format of that bytestream is subject to change.

The build process depends on the g++ compiler.


On a standard Unix-style environment:

git clone --recursive
cd woff2
make clean all


Ensure the binaries from the build process are in your $PATH, then:

woff2_compress myfont.ttf
woff2_decompress myfont.woff2


Also please refer to documents (currently Google Docs):

WOFF Ultra Condensed file format: proposals and discussion of wire format issues (PDF is in docs/ directory)

WIFF Ultra Condensed: more discussion of results and compression techniques. This tool was used to prepare the data in that document.