Pretext.js (pretextjs.dev) is an independent community website dedicated to Pretext, the open-source, MIT-licensed JavaScript/TypeScript text layout engine created by chenglou. Pretext measures and lays out text with pure arithmetic — no DOM reads, no reflow — which makes it dramatically faster than traditional browser-based text measurement.
This site exists to help developers discover and learn the library. Here you'll find:
This website is run by an independent developer and is not affiliated with, endorsed by, or operated by chenglou, the author of the Pretext library. All credit for the Pretext library itself belongs to chenglou and its contributors. The canonical source for the library — including issues, releases, and contributions — is the official repository at github.com/chenglou/pretext.
The demos, tools, articles, and games published on this site are original works created for this site unless otherwise credited on the page where they appear.
Questions, corrections, or suggestions about this site are always welcome — see the contact page or email us at support@pretextjs.dev.
For questions about the Pretext library itself (bugs, feature requests, contributions), please use the official GitHub repository instead.