UNPKG

modern-text

Version:

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

64 lines (59 loc) 2.26 kB
'use strict'; const Text = require('./shared/modern-text.DoajDfJ6.cjs'); const deformation = require('./shared/modern-text.NnJOuHzn.cjs'); const curves = require('./shared/modern-text.MC5bIC9E.cjs'); require('modern-font'); require('modern-idoc'); require('modern-path2d'); function measureText(options, load) { const text = new Text.Text(options); if (load) { return text.load().then(() => { return text.measure(); }); } return text.measure(); } function renderText(options, load) { const text = new Text.Text(options); if (load) { return text.load().then(() => { return text.render(options); }); } return text.render(options); } exports.Canvas2DRenderer = Text.Canvas2DRenderer; exports.Character = Text.Character; exports.Fragment = Text.Fragment; exports.Measurer = Text.Measurer; exports.Paragraph = Text.Paragraph; exports.Text = Text.Text; exports.backgroundPlugin = Text.backgroundPlugin; exports.createSvgLoader = Text.createSvgLoader; exports.createSvgParser = Text.createSvgParser; exports.getEffectTransform2D = Text.getEffectTransform2D; exports.getHighlightStyle = Text.getHighlightStyle; exports.highlightPlugin = Text.highlightPlugin; exports.isEqualObject = Text.isEqualObject; exports.isEqualValue = Text.isEqualValue; exports.listStylePlugin = Text.listStylePlugin; exports.outlinePlugin = Text.outlinePlugin; exports.parseColormap = Text.parseColormap; exports.parseTransformOrigin = Text.parseTransformOrigin; exports.parseValueNumber = Text.parseValueNumber; exports.renderPlugin = Text.renderPlugin; exports.textDecorationPlugin = Text.textDecorationPlugin; exports.textDefaultStyle = Text.textDefaultStyle; exports.defineDeformation = deformation.defineDeformation; exports.definePlugin = deformation.definePlugin; exports.deformationPlugin = deformation.deformationPlugin; exports.getDeformationNames = deformation.getDeformationNames; exports.removeDeformation = deformation.removeDeformation; exports.CircleCurve = curves.CircleCurve; exports.EllipseCurve = curves.EllipseCurve; exports.HeartCurve = curves.HeartCurve; exports.PolygonCurve = curves.PolygonCurve; exports.RectangularCurve = curves.RectangularCurve; exports.measureText = measureText; exports.renderText = renderText;