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

exportFonts

  • exportFonts(
        compressionContext: null | WoffCompressionContext,
        families: FamilySettings[],
        settings: ExportFontsSettings,
    ): Promise<ExportedFont[]>

    Export (subset and compress) font families using the given settings.

    Parameters

    • compressionContext: null | WoffCompressionContext

      WOFF/WOFF2 compression context to use. This can be null if no compressed formats are enabled in the output, but will throw an error if it isn't provided and there are compressed formats enabled.

    • families: FamilySettings[]

      Font families to export, and their subsetting settings.

    • settings: ExportFontsSettings

      Export-wide settings.

    Returns Promise<ExportedFont[]>

    A promise that resolves to all the exported fonts. These can then be written to disk, used to generate CSS, etc.

    • Defined in index.ts:1132