What problem does it solve?
Pretext measures and lays out multiline text without DOM reflow, so you can build creative browser demos where text behaves like geometry around obstacles and animations.
Core Features & Use Cases
- DOM-free text measurement: Computes line breaks, per-line widths, and grapheme positions using canvas measurement (no layout thrash).
- Variable-width streaming layout: Continuously routes text row-by-row using corridor widths, enabling text that flows around moving shapes.
- Single-file HTML demos: Produces shippable browser demos that render immediately by doing layout math in JavaScript and drawing yourself on canvas.
Use cases include kinetic typography, ASCII/prose “text-as-geometry” games, reflow-around-orb/sprite editorial layouts, and multiline shrink-wrap quote cards where you need the exact wrapping width before rendering.
Quick Start
Use the pretext skill to generate a single-file HTML demo that flows a paragraph around a moving orb using Pretext’s row-by-row streaming layout.