Function getFontFormatFromPath

  • Infers the font format from a font file extension. Supported extensions include: eot, woff2, woff, ttf, otf, svg.

    Parameters

    • path: string

      The path of the font file.

    Returns FontFormat

    The font format. Defaults to opentype if unable to infer.