# Pretext

Pure TypeScript library for multiline text measurement and layout without DOM reflow. prepare() caches Canvas font metrics once; layout() computes line breaks and height at any width with pure arithmetic — built for Canvas, SVG, WebGL, virtualized chat, and editorial layouts.



[Pretext](https://chenglou.me/pretext/)
