woff2_ffi_bindings library

Functions

woff2_compute_final_size(Pointer<Uint8> data, int length) int
Compute the size of the final uncompressed font, or 0 on error.
woff2_convert_from_ttf(Pointer<Uint8> data, int length, Pointer<Uint8> result, Pointer<Size> result_length) bool
Compresses the font into the target buffer. *result_length should be at least the value returned by MaxWOFF2CompressedSize(), upon return, it is set to the actual compressed size. Returns true on successful compression.
woff2_convert_from_ttf_with_params(Pointer<Uint8> data, int length, Pointer<Uint8> result, Pointer<Size> result_length, Pointer<woff2_params_t> params) bool
Compresses the font into the target buffer. *result_length should be at least the value returned by MaxWOFF2CompressedSize(), upon return, it is set to the actual compressed size. Returns true on successful compression.
woff2_convert_to_ttf(Pointer<Uint8> data, int length, Pointer<woff2_out_t> out) bool
Decompresses the font into out. Returns true on success. Works even if WOFF2Header totalSfntSize is wrong.
woff2_default_max_size() int
Suggested max size for output.
woff2_max_compressed_size(Pointer<Uint8> data, int length) int
Returns an upper bound on the size of the compressed file.
woff2_max_compressed_size_with_extended_metadata(Pointer<Uint8> data, int length, Pointer<Char> extended_metadata) int
Returns an upper bound on the size of the compressed file.
woff2_memory_out_create(Pointer<Uint8> buf, int buf_size) Pointer<woff2_memory_out_t>
woff2_memory_out_destroy(Pointer<woff2_memory_out_t> out) → void
woff2_memory_out_size(Pointer<woff2_memory_out_t> out) int
woff2_memory_out_write(Pointer<woff2_memory_out_t> out, Pointer<Void> buf, int n) bool
woff2_memory_out_write_at(Pointer<woff2_memory_out_t> out, Pointer<Void> buf, int offset, int n) bool
woff2_out_destroy(Pointer<woff2_out_t> out) → void
woff2_out_size(Pointer<woff2_out_t> out) int
woff2_out_write(Pointer<woff2_out_t> out, Pointer<Void> buf, int n) bool
woff2_out_write_at(Pointer<woff2_out_t> out, Pointer<Void> buf, int offset, int n) bool
woff2_params_create() woff2_params_t
woff2_string_out_create() Pointer<woff2_string_out_t>
woff2_string_out_data(Pointer<woff2_string_out_t> out) Pointer<Uint8>
woff2_string_out_destroy(Pointer<woff2_string_out_t> out) → void
woff2_string_out_max_size(Pointer<woff2_string_out_t> out) int
woff2_string_out_set_max_size(Pointer<woff2_string_out_t> out, int max_size) → void
woff2_string_out_size(Pointer<woff2_string_out_t> out) int
woff2_string_out_write(Pointer<woff2_string_out_t> out, Pointer<Void> buf, int n) bool
woff2_string_out_write_at(Pointer<woff2_string_out_t> out, Pointer<Void> buf, int offset, int n) bool