Lightlines
By reason-machines

pretext-text-measurement

reason-machines691 installs

Measure and wrap browser text without reflow.

What it does

Guides developers in measuring and laying out multiline text in JavaScript or TypeScript without DOM layout measurements.

When to use it

Use for DOM-free text measurement, paragraph heights, canvas wrapping, text around images, or shrinkwrapped text widths.

How to use it

It changes how the agent implements text measurement and layout, separating cached text preparation from repeated layout calculations.

What you provide

  • An existing project

Latest review

What you need · 2

The examples and API guidance use the @chenglou/pretext library.

Requires a browser environment with the canvas API; server-side support is described as coming soon.


Access · 0

No additional actions listed.