EDITORIAL COVER — NOT AN UPSTREAM RENDER
Motion design tool

Pretext

JavaScript/TypeScript text measurement and multiline layout for animated titles, captions, and text cards. Reuse cached measurements, line widths, and wrapping with DOM, Canvas, or SVG; load the intended fonts and add your own animation timeline and video renderer.

What you’re reusing

A supporting library for video graphics. Integrate its output with your own animation timeline and renderer; it is not a finished-film template.

A good starting point for

Use-case recommendations are editorial assessments.

Make it your own

  1. Inspect the actual source.

    Open the linked artifact and its project instructions. Check the required runtime, inputs, and upstream terms.

  2. Adapt the content and visual direction.

    Use the replacement notes above. Bring your own copy, data, assets, and branding; match the timing to your story.

  3. Preview, render, and review.

    Follow the upstream render workflow. Check framing, typography, audio, and output before publishing.

Review & sources 1

Source and documentation review is separate from installation and render testing.

Pretext — text measurement and line layout API2026-10-27

Reviewed upstream README and API examples at commit 0d102a5cd933611e86a7e60bda7b4baa5995c6b0: @chenglou/pretext, prepare/layout, measureNaturalWidth, measureLineStats and layoutWithLines; DOM, Canvas and SVG output. Video title/caption use is an editorial integration recommendation, not a shipped video renderer. No installation or render test performed. Auto-fit and balanced CLI flags are not asserted as upstream APIs.

Read reviewed source

Keep exploring.

The full index ↗
Shot recipe

Text as Mask

Product imagery revealed through oversized letterforms for brand openings and feature reveals. Replace the title and background imagery.

video-shotcraftSource reviewed