CompressOptions
type CompressOptions = {
algorithm: "woff" | "woff2";
level?: number;
transfer?: boolean;
}
Properties
algorithm
algorithm: "woff" | "woff2"
The compression algorithm to use, either woff or woff2.
Optionallevel
level?: number
The compression level. For WOFF2, this can range from 0 to 11. For WOFF, this means the number of Zopfli iterations and can theoretically go up to any value, although 15 is a good default.
If not provided, the default is 15 iterations for WOFF and a level of 11 for WOFF2.
Optionaltransfer
transfer?: boolean
If true, the passed font file's buffer will be transferred to a worker thread and no longer usable on this thread.
Options for the WoffCompressionContext#compressFromTTF method.