Skip to content

charton API


charton API / @chart-on/core / index / fontCss

Function: fontCss() ​

fontCss(font, size?, weight?): string

Defined in: packages/core/src/typography.ts:79

CSS font shorthand for font, at size px when given. A regular weight is left out, so the default theme yields the same string as before typography.

Parameters ​

font ​

ResolvedFont

size? ​

number = font.fontSize

weight? ​

FontWeight = font.fontWeight

Returns ​

string