A pure JavaScript and TypeScript library for measuring and laying out multiline text quickly and accurately, supporting scripts most libraries ignore, and rendering to the DOM, Canvas or SVG.
TypeScriptCreated
What is chenglou/pretext?
Pretext is a pure JavaScript and TypeScript library for measuring and laying out multiline text. Its key idea is to avoid DOM measurements such as getBoundingClientRect and offsetHeight, which force the browser to recalculate layout and are expensive. The README says it is fast and accurate, supports many writing systems, and can render to the DOM, to Canvas and to SVG.
Because it does its measurement in code, it can lay out text before it reaches the page, which helps with virtualised lists, animations and responsive typography. The project is published as a library with documentation in the repository.
It suits front-end engineers building text-heavy interfaces, graphics developers who render text on Canvas or SVG, and anyone who has struggled with layout thrashing caused by measuring text in the browser.
The full codebase and curriculum behind freeCodeCamp.org, a charity-run site where millions learn web development, Python, data science and math for free through interactive lessons, projects and verified certifications.
The archived repository for Vue 2, the progressive JavaScript framework for building web interfaces with reactive templates and components. Vue 2 has reached end of life; active development continues in the vuejs/core repository for Vue 3.
The open-source "Code - OSS" repository where Microsoft and the community develop Visual Studio Code, the widely used code editor with debugging, Git integration and a large extension marketplace.
An open-source virtual whiteboard for sketching diagrams, wireframes and drawings that look hand-drawn. It supports real-time collaboration with end-to-end encryption and can be embedded in your own apps as a React component.