pub struct WriteOptions {
pub reorder_tables: Option<bool>,
pub woff2_quality: u32,
pub woff2_progress: Option<Progress>,
pub use_zopfli: bool,
}Expand description
Options for Font::write (TTFont.save).
Fields§
§reorder_tables: Option<bool>Some(true) (the default) sorts tables as the OpenType specification
recommends; Some(false) keeps the original order; None writes them in
dependency order (reorderTables).
woff2_quality: u32The Brotli quality of WOFF 2.0 output, from 0 to 11. fontTools always uses 11 (the default); lower values are much faster, but the file is larger.
woff2_progress: Option<Progress>Called as the font data of WOFF 2.0 output is compressed, which takes nearly all of the time, with the fraction of the data read by Brotli so far. It is called thousands of times for a large font, so throttle in the callback if needed. Not called for other flavors.
use_zopfli: boolCompress WOFF 1.0 with zopfli instead of zlib (fontTools’
sfnt.USE_ZOPFLI, which --with-zopfli sets): smaller and much slower. The
compressed bytes may differ from fontTools’, the decompressed data does not.