UNPKG

modern-text

Version:

Measure and render text in a way that describes the DOM.

30 lines (26 loc) 1.38 kB
import { T as Text } from './shared/modern-text.Dd6yqc4a.mjs'; export { C as Canvas2DRenderer, a as Character, F as Fragment, M as Measurer, P as Paragraph, b as backgroundPlugin, c as createSvgLoader, d as createSvgParser, g as getEffectTransform2D, e as getHighlightStyle, h as highlightPlugin, i as isEqualObject, f as isEqualValue, l as listStylePlugin, o as outlinePlugin, p as parseColormap, j as parseTransformOrigin, k as parseValueNumber, r as renderPlugin, t as textDecorationPlugin, m as textDefaultStyle } from './shared/modern-text.Dd6yqc4a.mjs'; export { d as defineDeformation, a as definePlugin, b as deformationPlugin, g as getDeformationNames, r as removeDeformation } from './shared/modern-text.C0w4dLp7.mjs'; export { C as CircleCurve, E as EllipseCurve, H as HeartCurve, P as PolygonCurve, R as RectangularCurve } from './shared/modern-text.fT17R5HY.mjs'; import 'modern-font'; import 'modern-idoc'; import 'modern-path2d'; function measureText(options, load) { const text = new Text(options); if (load) { return text.load().then(() => { return text.measure(); }); } return text.measure(); } function renderText(options, load) { const text = new Text(options); if (load) { return text.load().then(() => { return text.render(options); }); } return text.render(options); } export { Text, measureText, renderText };