Glypht
  • Documentation
  • Discussions
  • GitHub
Navigation
  • Documentation
    • @glypht/bundler-utils
      • NodeType
      • CSSSpan
      • CSSOutput
      • FeatureMetadata
      • FamilyInfo
      • SubsetAxisSetting
      • ExportedFont
      • CharacterSetSettings
      • FamilySubsetSettings
      • FamilySettings
      • ExportFontsSettings
      • featureMetadata
      • sortFontsIntoFamilies
      • exportedFontsToCSS
      • exportFonts
      • parseUnicodeRanges
      • parseRanges
      • formatUnicodeRanges
    • @glypht/cli
      • GlyphtConfig
      • build
    • @glypht/core
      • AxisValueFormat
      • AxisValueFlags
      • WoffCompressionContext
      • GlyphtContext
      • CompressOptions
      • DecompressOptions
      • LoadFontsOptions
      • AxisInfo
      • SubsetAxisInfo
      • StyleValue
      • FeatureInfo
      • NamedInstance
      • StyleKey
      • StyleValues
      • SfntVersion
      • DesignAxisRecord
      • AxisValueSingle
      • AxisValueRange
      • AxisValueLinked
      • AxisValueMultiple
      • AxisValue
      • StyleAttributes
      • SubsettedFont
      • SubsetInfo
      • SubsetAxisSetting
      • SubsetSettings
      • FontRef
      • SubsetName
      • SUBSET_NAMES
    • Comparison with other tools
    • Web app

CompressOptions

Options for the WoffCompressionContext#compressFromTTF method.

type CompressOptions = {
    algorithm: "woff" | "woff2";
    level?: number;
    transfer?: boolean;
}
  • Defined in compression.ts:6
Index

Properties

algorithm level? transfer?

Properties

algorithm

algorithm: "woff" | "woff2"

The compression algorithm to use, either woff or woff2.

  • Defined in compression.ts:8

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.

  • Defined in compression.ts:15

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.

  • Defined in compression.ts:20