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
Section titled “Parameters”string
Returns
Section titled “Returns”object
family
Section titled “family”family:
string
style:
string
weight
Section titled “weight”weight:
string