Skip to content

pptx-ts/measure ​

The calibrated text-measurement engine as a standalone, public surface, so a consumer can lay out its own geometry (grow a card, reflow a grid, detect overflow) before export without a TsPptx instance.

This is the same wrap model + solvers the export-time autofit bake uses (see docs/contributing/design/text-fit.md), so a layout-time prediction never disagrees with the baked result. For the ergonomic, inches-based path use pptx.measureText() / pptx.overflowsBox() on a presentation instance; reach for these primitives when you need to build your own resolver/registry and measure standalone.

opentype.js (used by parseFontMetrics) is imported lazily, so importing this module does not pull it into the bundle until a font is actually parsed.

Classes ​

Interfaces ​

Type Aliases ​

Variables ​

Functions ​

References ​

Diagnostic ​

Re-exports Diagnostic


DiagnosticCode ​

Re-exports DiagnosticCode


DiagnosticHandler ​

Re-exports DiagnosticHandler


ErrorCode ​

Re-exports ErrorCode


InternalError ​

Re-exports InternalError


InternalErrorCode ​

Re-exports InternalErrorCode


InvalidOptionError ​

Re-exports InvalidOptionError


InvalidOptionErrorCode ​

Re-exports InvalidOptionErrorCode


MeasureTextOptions ​

Re-exports MeasureTextOptions


MediaError ​

Re-exports MediaError


MediaErrorCode ​

Re-exports MediaErrorCode


OverflowBoxOptions ​

Re-exports OverflowBoxOptions


PackageReadError ​

Re-exports PackageReadError


PackageReadErrorCode ​

Re-exports PackageReadErrorCode


resetDiagnosticState ​

Re-exports resetDiagnosticState


setDiagnosticHandler ​

Re-exports setDiagnosticHandler


TextMeasurement ​

Re-exports TextMeasurement


TsPptxCode ​

Re-exports TsPptxCode


TsPptxError ​

Re-exports TsPptxError


TsPptxErrorOptions ​

Re-exports TsPptxErrorOptions


UnsupportedFeatureError ​

Re-exports UnsupportedFeatureError


UnsupportedFeatureErrorCode ​

Re-exports UnsupportedFeatureErrorCode