Skip to content

TextMeasureService documentation

import { TextMeasureService } from '@siemens/element-ng/common';

Attributes and Methods

NameTypeDescription
getFontStyle()
(element: HTMLElement, overrides?: FontStyleOverride) => string

Get font styles for font CSS short-hand property.

measureText()
(text: string, fontRef?: string | HTMLElement, overrides?: FontStyleOverride) => number

Measure text width in pixel.

Types Documentation

import type { FontStyleOverride } from '@siemens/element-ng/common';

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