
Hey @_chenglou, First impression: I resized the browser window and the entire editorial spread - title, body text, two columns - just reflowed instantly. No jank, no flicker, no "wait for the DOM to catch up" moment. I've built enough dashboards and text-heavy UIs to know what layout reflow looks like when you stress it. This had none of it. Then I clicked the logos and watched the text reroute around them in real time. That's obstacle-aware text flow in pure JavaScript. No absolutely positioned hacks, no CSS shapes with hardcoded coordinates, no hidden divs measuring themselves in the background. Just math. What really got me thinking: I've worked on projects where we needed dynamic text containers - chat bubbles, card layouts, responsive text panels - and every single time we ended up fighting the browser. You measure, you trigger reflow, you measure again, you get the wrong height on the first frame, you add a requestAnimationFrame hack, and you still get a visible layout shift on slower devices. It's the kind of thing you learn to live with because there was never an alternative. Pretext is that alternative. The prepare-once-then-layout-with-pure-arithmetic approach means you can speculatively test dozens of width/height combinations without the browser even knowing about it. That changes how you think about responsive design entirely. The multilingual support also deserves more attention. I threw some mixed Arabic-English text at it mentally while reading the API docs - the fact that it handles bidi, CJK line breaks, grapheme clusters, and emoji all in one pipeline tells me this wasn't built in a weekend. This is deep, patient engineering. If I had one wish: I'd love to see a React hook wrapper - something like usePretext(text, font, maxWidth) that returns height and lines, keeping the prepare() cache stable across re-renders. That would make adoption in existing React codebases almost zero-friction. Incredible work. This is one of those rare libraries where the demos don't just show what it can do - they show what the entire web has been missing.








