Font

live example

Explore the API in the live example.

api reference

Font()
Component implementing the font features. When this component is available for a widget, its API is exposed via the .font namespace.
Font.color([color])
Sets the font color of the widget. Default color is black.

Parameters

NameTypeDescription
colorstringoptionalColor to set as font color. Default value is black.

Returns

Widget
Reference to the Widget API.
Font.size([size])
Sets the font size of the widget in pixels. Default size is 12px.

Parameters

NameTypeDescription
sizenumberoptionalSize of the font in pixels. Default value is 12.

Returns

Widget
Reference to the Widget API.