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

GlyphtConfig

The configuration format for the Glypht CLI. This is what you'll export from your config file.

type GlyphtConfig = {
    input: string | string[];
    outDir: string;
    outCssFile?: string;
    includeTtfInCss?: boolean;
    basePath?: string;
    settings: Record<string, FamilySubsetSettings>;
    formats?: { ttf?: boolean; woff?: boolean; woff2?: boolean };
    woffCompression?: number;
    woff2Compression?: number;
}
  • Defined in index.ts:6
Index

Properties

input outDir outCssFile? includeTtfInCss? basePath? settings formats? woffCompression? woff2Compression?

Properties

input

input: string | string[]

One or more paths to input font files. These can be glob patterns.

  • Defined in index.ts:8

outDir

outDir: string

The directory where the optimized fonts and CSS will be written.

This is resolved relative to the location of the config file.

  • Defined in index.ts:14

OptionaloutCssFile

outCssFile?: string

The path to write the CSS file to. If not specified, it will be written to fonts.css in outDir.

  • Defined in index.ts:16

OptionalincludeTtfInCss

includeTtfInCss?: boolean

If you choose to output .ttf files, whether or not to include them in the output CSS as a src. Defaults to true if omitted.

  • Defined in index.ts:21

OptionalbasePath

basePath?: string

A path to prepend to the font URLs in the generated CSS file.

  • Defined in index.ts:23

settings

settings: Record<string, FamilySubsetSettings>

Subset settings for each font family.

  • Defined in index.ts:25

Optionalformats

formats?: { ttf?: boolean; woff?: boolean; woff2?: boolean }

Which font formats to output. Defaults to {woff2: true}.

  • Defined in index.ts:27

OptionalwoffCompression

woffCompression?: number

The Zopfli iteration count for WOFF compression (default: 15).

  • Defined in index.ts:33

Optionalwoff2Compression

woff2Compression?: number

The Brotli compression level for WOFF2 compression, from 0 to 11 (default: 11).

  • Defined in index.ts:35