Skip to main content

Crate wuff_capi

Crate wuff_capi 

Source
Expand description

C API for the wuff WOFF2 decoder.

This crate exposes extern "C" symbols wrapping wuff’s WOFF2 decoder, plus (in its include directory) C++ headers (woff2/decode.h and woff2/output.h) which reimplement the decoding API of the woff2 C++ library on top of those symbols. This allows the crate to be used as a drop-in replacement for the woff2 library by C/C++ code (such as the ots sanitiser) that consumes only its decoding API.

Build scripts of dependent crates can locate the headers via the DEP_WUFF_INCLUDE_DIR environment variable.

Functions§

wuff_woff2_compute_final_size
Compute the size of the final uncompressed font, or 0 on error.
wuff_woff2_decode
Decompress a WOFF2 font into a newly-allocated buffer.
wuff_woff2_free
Free a buffer previously returned by wuff_woff2_decode.