Hover any element to compare the Pretext-predicted width & height against what the browser actually rendered — live, on any page.
No extension required. Drag the button below to your browser's bookmarks bar. Click it on any page to toggle the measurement overlay.
Drag the button above to your bookmarks bar, then click it on any page to inspect text measurements.
Toggle the overlay, then hover any element below to see Pretext measurements. The panel shows predicted vs actual dimensions, match %, and overflow detection.
The quick brown fox
Typography is the art and technique of arranging type to make written language legible, readable and appealing when displayed.
Last updated March 2026 · Version 0.1.0 · MIT License See changelog for details on recent updates and breaking changes.
const x = measureElement(el);
SHIP IT AND PRAY
This is a very long string that should be clipped by white-space nowrap and text-overflow ellipsis
This text block is artificially height-constrained to 52 px with overflow:hidden so the bottom lines are clipped and invisible to the reader even though they exist in the DOM.
Tracking Demo Text
Text with bold fragments and italic accents mixed in the flow.
Aa
Legal: This product is provided as-is without warranty of any kind express or implied including but not limited to warranties of merchantability fitness for purpose and non-infringement.
Pretext is the idea that, given a
font stack, size, weight, letter-spacing, and a string of characters, you can
predict the rendered pixel dimensions before layout happens — using
nothing but the browser's Canvas 2D
measureText() API.
Pretext DevTools exposes those predictions live so you can spot mismatches,
overflow, and clipping at a glance.
Canvas measureText() + letter-spacing correction across the full character run.
Resolved line-height × estimated line count (word-wrap aware).
100% = canvas prediction matches getBoundingClientRect exactly. Lower = font hinting diverged.
Compares scrollWidth/Height to clientWidth/Height. Marks CLIPPED when overflow:hidden hides content.