Skip to content
No description, website, or topics provided.
C++ CMake Makefile
Branch: master
Clone or download

Latest commit

rsheeter Merge pull request #114 from garretrieger/master
[subset] Check for overflow when decoding glyf.
Latest commit a0d0ed7 Jun 1, 2018


Type Name Latest commit message Commit time
Failed to load latest commit information.
brotli @ 533843e update brotli to v1.0.3 Mar 16, 2018
cmake Add support for the CMake build system. Oct 5, 2017
include/woff2 Move public headers into a separate include/woff2 directory Oct 5, 2017
src [subset] Check for overflow when decoding glyf. Jun 1, 2018
.gitignore ignore woff2_info binary Aug 23, 2017
.gitmodules Make brotli a submodule Nov 18, 2014
CMakeLists.txt Set version to 1.0.2 Nov 13, 2017 Add Feb 18, 2016
LICENSE Relicense as MIT Oct 4, 2017
Makefile Correct setup of ARFLAGS Oct 9, 2017 Add support for the CMake build system. Oct 5, 2017

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 the MIT 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

Alternatively, if Brotli is already installed on your system you can use CMake to build executables and libraries:

git clone
cd woff2
mkdir out
cd out
cmake ..
make install

By default, shared libraries are built. To use static linkage, do:

cd woff2
mkdir out-static
make install


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.

You can’t perform that action at this time.