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

exportedFontsToCSS

  • exportedFontsToCSS(
        fonts: ExportedFont[],
        fontPathPrefix: string,
        includeUncompressed: boolean,
    ): CSSOutput

    Takes a list of exported fonts and generates a stylesheet containing @font-face declarations for them all.

    Parameters

    • fonts: ExportedFont[]

      Exported fonts.

    • fontPathPrefix: string

      Path under which the fonts will be located--this will be prefixed to the url(...) in the src property of each font. A trailing slash may be present or absent; both are handled correctly.

    • includeUncompressed: boolean

      Whether to include the uncompressed .ttf files in the CSS.

    Returns CSSOutput

    CSS output, that can be used as a list of typed tokens (for syntax highlighting) or as a string.

    • Defined in index.ts:980