@chenglou/pretext measures and lays out text using pure arithmetic. No DOM reads, no reflow, no thrashing. This demo shows what that means for responsive height prediction and masonry-style card layouts.
Type or paste text, adjust the container width, and watch Pretext calculate height and line count instantly via canvas-cached arithmetic.
Every card height is predicted by Pretext before rendering. The masonry layout is computed from those heights with zero DOM reads. Resize or change columns and watch it recalculate.