Skip to content

TextMeasureService documentation

provided in root

Attributes and Methods

NameTypeDefaultDescription
getFontStyle(...)
(element: HTMLElement, overrides: FontStyleOverride) => stringGet font styles for font CSS short-hand property.

Parameters
measureText(...)
(text: string, fontRef: (string | HTMLElement), overrides: FontStyleOverride) => numberMeasure text width in pixel.

Parameters

Types Documentation

Properties
fontFamily?: string
fontSize?: string
fontStyle?: string
fontVariant?: string
fontWeight?: string

Except where otherwise noted, content on this site is licensed under MIT License.