Skip to main content

Class: Font

Constructors​

constructor​

• new Font(fontStyle, fontVariant, fontWeight, fontSize, fontFamily, inherit?)

Parameters​

NameType
fontStylestring
fontVariantstring
fontWeightstring
fontSizestring
fontFamilystring
inherit?string | Font

Defined in​

src/Font.ts:174

Properties​

styles​

â–ª Static Readonly styles: "normal|italic|oblique|inherit"

Defined in​

src/Font.ts:164


variants​

â–ª Static Readonly variants: "normal|small-caps|inherit"

Defined in​

src/Font.ts:165


weights​

â–ª Static Readonly weights: "normal|bold|bolder|lighter|100|200|300|400|500|600|700|800|900|inherit"

Defined in​

src/Font.ts:166


fontFamily​

• Readonly fontFamily: string

Defined in​

src/Font.ts:168


fontSize​

• Readonly fontSize: string

Defined in​

src/Font.ts:169


fontStyle​

• Readonly fontStyle: string

Defined in​

src/Font.ts:170


fontWeight​

• Readonly fontWeight: string

Defined in​

src/Font.ts:171


fontVariant​

• Readonly fontVariant: string

Defined in​

src/Font.ts:172

Methods​

parse​

â–¸ Static parse(font?, inherit?): Font

Parameters​

NameTypeDefault value
fontstring''
inherit?string | Fontundefined

Returns​

Font

Defined in​

src/Font.ts:85


toString​

â–¸ toString(): string

Returns​

string

Defined in​

src/Font.ts:195