pretext

Generate DOM-free text measurement and layout for browser demos.

Updated May 3, 2026
One-click install
npx skills add https://github.com/JuanMS20/solviora-agent --skill pretext-juanms20
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/JuanMS20/solviora-agent/tree/main/skills/creative/pretext
Command: npx skills add https://github.com/JuanMS20/solviora-agent --skill pretext-juanms20

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Pretext provides DOM-free text measurement and layout so you can build creative browser demos without relying on DOM reflow, enabling precise, per-glyph positioning and flow around shapes.

Core Features & Use Cases

It offers two main use cases: flowing text around obstacles (e.g., circular or polygonal regions), and rendering text as geometry for generative art, kinetic typography, and ASCII-art style demos. It supports single-file HTML demos and a tiny, dependency-light workflow, with optional templates and reference patterns to accelerate development.

Quick Start

Create a single-file HTML demo that uses pretext to render a creative, DOM-free text layout.

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I generate DOM-free text layouts for creative browser demos?

DOM-free text layouts for browser demos are generated using the pretext API to measure text and position glyphs precisely without relying on DOM reflow. You can apply this to flow-around-obstacle layouts, text-as-geometry visuals, and ASCII-art typography in standalone HTML files.

What is the best way to flow text around obstacles like circles in HTML5 canvas?

Flowing text around obstacles in HTML5 canvas is handled by pretext using prepareWithSegments and layoutNextLineRange to calculate line ranges that wrap around polygonal or circular regions. This enables precise generative text layout without DOM dependencies.

Can I create kinetic typography and ASCII-art visuals in a single-file HTML demo?

Kinetic typography and ASCII-art visuals can be created in a single-file HTML demo by using pretext to render text as geometry. The API supports dependency-light workflows and optional reference patterns to accelerate standalone generative art development.

Do I need any dependencies to use pretext for generative text layout?

Pretext requires no external dependencies to perform generative text layout. It operates DOM-free using its own API for text measurement and positioning, though optional support directories and templates can be added for extended functionality.

Why does precise per-glyph positioning matter for creative coding typography?

Precise per-glyph positioning matters for creative coding typography because it allows you to treat text as geometry independent of DOM reflow constraints. Pretext enables this by measuring and materializing individual glyph ranges for kinetic and generative visual effects.