← HomeLogin
Pure JavaScript/TypeScript library for multiline text measurement & layout
~dev.sourcebrowserstypescript
github.com 2 days ago

Summary

Pretext side-steps the need for DOM measurements (e.g. getBoundingClientRect, offsetHeight), which trigger layout reflow, one of the most expensive operations in the browser. It implements its own text measurement logic, using the browsers' own font engine as ground truth (very AI-friendly iteration method).