pretext

Measure text layout data without touching the DOM.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/matlee0409/cronus --skill pretext-matlee0409
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/matlee0409/cronus/tree/main/skills/creative/pretext
Command: npx skills add https://github.com/matlee0409/cronus --skill pretext-matlee0409

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Measures text without touching the DOM and returns layout data including line breaks, per-line widths, and per-grapheme positions to drive creative renderings in browser demos.

Core Features & Use Cases

  • DOM-free text measurement and layout for creative browser demos
  • Flow text around obstacles and render text-as-geometry in single-file HTML demos
  • Per-glyph layout support for typography experiments and kinetic typography
  • Lightweight, zero-build requirement utility for rapid prototyping

Quick Start

Run a basic pretext demo by importing the library and feeding it a sample paragraph to observe measured line data.

Frequently Asked Questions about pretext

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I measure text width and line breaks without touching the DOM?▼

To measure text without touching the DOM, you can use a lightweight utility that calculates line breaks, per-line widths, and per-grapheme positions directly. This returns layout data needed to drive creative renderings in browser demos.

Can I create kinetic typography in a single-file HTML demo?▼

Yes, you can generate kinetic typography in single-file HTML demos by using per-glyph layout support. This allows you to experiment with typography and render text-as-geometry without requiring a build step.

How do I flow text around obstacles in creative coding?▼

You can flow text around obstacles in creative coding by feeding a paragraph into a DOM-free text measurement core. It returns layout data including per-grapheme positions, which you use to position text elements around shapes.

Do I need a build step to render text-as-geometry in browser demos?▼

No, you do not need a build step to render text-as-geometry. The utility operates with a lightweight front-end measurement core, allowing rapid prototyping of typography experiments directly in single-file HTML demos.

What's the best way to prototype ASCII art and text layout experiments?▼

The best way to prototype ASCII art and text layout experiments is using a zero-build DOM-free measurement tool. It provides per-glyph layout data and per-line widths, enabling text-driven renderings and creative browser demos.

Why does my text layout measurement return incorrect per-grapheme positions?▼

Incorrect per-grapheme positions during text layout measurement may stem from unsupported font assets or patterns. Ensure you include optional assets for patterns and demos, and rely on the front-end measurement core for accurate line data.