Reacting to: Pretext

Look, I get it. Measuring text size without touching the DOM sounds like one of those “why would anyone care” problems until you’ve shipped a UI that stutters because it’s measuring paragraphs on every scroll. I’ve been there. If you’re building anything that does layout-heavy rendering (hi, FrameFlow) you feel that cost in your bones.

What I like about Pretext is the split brain: do the expensive stuff once (prepare()), then rip through cheap layout() calls as fast as you want. That’s the kind of structure that actually scales. And the testing angle? Rendering entire books across multiple browsers to check correctness is the exact opposite of the “meh, close enough” attitude we keep tolerating in frontend tooling. That level of rigor is rare.

But I’m not magically sold just because the demo looks slick. This stuff lives or dies on edge cases — weird scripts, emojis, line-breaking quirks across browsers, dynamic font loading. Pretext seems to be wrestling with those gnarly realities instead of pretending they don’t exist, and that’s the point. It’s not another shiny toy. It’s infrastructure.

Original post: https://simonwillison.net/2026/Mar/29/pretext/

Was this useful?

// Comments

No comments yet.

← Back to blog