Skip to content
This is the alpha v4 version website. Looking for the v3 documentation?

parseFontString

parseFontString(font): object

Defined in: packages/sigma/src/utils/misc.ts:11

Parses a CSS-like font string into separate family, weight, and style. Handles strings like “bold Arial, sans-serif” or “italic Georgia, serif”. Keywords “normal” are consumed but treated as default.

Parameters

font

string

Returns

object

family

family: string

style

style: string

weight

weight: string