pretext

Measure and lay out multiline text around shapes without DOM reflow.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Measure and lay out multiline text around obstacles without DOM reflow, enabling fast, creative browser demos.

Core Features & Use Cases

  • DOM-free text measurement and layout data (line breaks, per-line widths, per-glyph positions, total height)
  • Creative demos: text-around-obstacles, text-as-geometry games, kinetic typography, and typographic generative art
  • Single-file HTML demos with templates and references to accelerate prototyping

Quick Start

Open the sample pretext demo HTML in templates/hello-orb-flow.html and replace the sample text to render your own demo.

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I wrap text around shapes in canvas without DOM reflow?

DOM-free text layout calculates line breaks, per-line widths, and per-glyph positions algorithmically, returning geometry data for direct canvas rendering without browser reflow.

What is kinetic typography and how does text-as-geometry work in generative art?

Kinetic typography applies text-as-geometry by treating per-glyph positions as animated coordinates, enabling generative art where multiline text flows dynamically around obstacles on a canvas.

How do I measure multiline text and get per-glyph positions for creative coding?

You measure multiline text and obtain per-glyph positions by passing pinned fonts and input text to a layout API that returns line breaks, line widths, and total height for rendering.

Can I build a single-file HTML demo for dynamic text layout using canvas?

Yes, you can build a single-file HTML demo by using provided templates with pinned fonts and a straightforward layout API to render dynamic text wrapping around obstacles.

Does this DOM-free text layout approach work for editorial layouts requiring text-around-obstacles?

Yes, the DOM-free text layout approach works for editorial layouts by measuring multiline text and calculating line breaks around obstacles to return precise per-glyph positions for rendering.