pretext

Create dynamic browser text layouts using measured text geometry with canvas rendering.

3|1|Updated Apr 19, 2024
One-click install
npx skills add https://github.com/guccang/blogclaw --skill pretext-guccang
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pretext
Source: https://github.com/guccang/blogclaw/tree/main/cmd/hermes-agent/vendor/hermes_runtime/skills/creative/pretext
Command: npx skills add https://github.com/guccang/blogclaw --skill pretext-guccang

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps developers create advanced browser text layouts and generative typography experiences without relying on DOM reflow, enabling precise control over text as visual geometry.

Core Features & Use Cases

  • Dynamic Text Layout: Build text flows around moving objects, custom shapes, and non-rectangular regions using measured line and glyph positions.
  • Creative Typography Demos: Create kinetic typography, ASCII art made from real text, text-based games, and generative browser artwork with canvas rendering.
  • Use Case: Imagine creating an interactive editorial page where paragraphs automatically wrap around a draggable object while maintaining smooth animation and accurate typography.

Quick Start

Use the pretext skill to create a single-file HTML demo where a paragraph flows around an animated orb using measured text layout.

Frequently Asked Questions about pretext

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

FAQPage Schema
How do I render dynamic text layouts on a canvas without relying on DOM reflow?

You can create dynamic canvas text layouts without DOM reflow by measuring text geometry directly and controlling glyph positions manually. This enables smooth text flows around moving objects while maintaining accurate typography.

What is generative typography and how does it work in browser experiences?

Generative typography in browser experiences uses measured line and glyph positions to create animated text visuals. It treats text as visual geometry, enabling kinetic typography and interactive text-based games rendered on a canvas.

How do I make an interactive editorial page where text wraps around a draggable object?

To make text wrap around a draggable object, apply measured text layout techniques to calculate real-time geometry. This allows paragraphs to dynamically flow around moving elements while preserving smooth animation and accurate typography.

Does this text layout approach support grapheme-aware rendering for creative coding?

Yes, this text layout approach supports grapheme-aware rendering for creative coding. It handles complex character clusters accurately, ensuring internationalized text and ASCII art maintain correct visual measurements during canvas rendering.

Can I build ASCII art and text-based games using canvas rendering?

You can build ASCII art and text-based games using canvas rendering by applying measured text geometry. This allows real text characters to act as dynamic visual elements, creating interactive generative browser artwork without DOM reflow.

What is the best way to handle kinetic type animations in a single-file HTML demo?

The best way to handle kinetic type animations in a single-file HTML demo is using measured text geometry with canvas rendering. This ensures precise control over moving typography without triggering performance-heavy DOM reflows.