Glyph Anatomy

A word builds as in a font editor, with metric guides, anchors along each contour and Bézier handles that pull straight segments into curves before the glyphs fill

Installation
$ pnpm dlx shadcn@latest add @remocn/glyph-anatomy

Usage

tsx
// src/Root.tsx
import { AbsoluteFill, Composition } from "remotion";
import { GlyphAnatomy } from "@/components/remocn/glyph-anatomy";
 
const Title = () => (
  <AbsoluteFill style={{ backgroundColor: "#0a0a0a" }}>
    <GlyphAnatomy text="Glyph" />
  </AbsoluteFill>
);
 
export const RemotionRoot = () => (
  <Composition
    id="GlyphAnatomy"
    component={Title}
    durationInFrames={96}
    fps={30}
    width={1280}
    height={720}
  />
);

Four guides draw across first: cap height, x-height, baseline and descender, read from the font's own metrics. Then, letter by letter two frames apart, anchors pop along each contour in drawing order. While they appear the outline runs straight from anchor to anchor. Handles grow out of the anchors next and pull each segment into its curve, overshooting a little before they settle. The glyphs fill in around frame 40 and the points, handles and guides fade out, leaving the clean word. keepPoints keeps the scaffolding.

TrueType fonts describe curves with quadratics; the component converts them to cubics so every curve shows one handle on each end, as in Figma or Glyphs. Static instances of variable fonts keep overlapping contours, and they show in the outline the way they would in a font editor.

fontUrl defaults to Inter ExtraBold from Google Fonts' static CDN and accepts any .ttf, .otf or .woff file. The labels use Inter from @remotion/google-fonts. The word centers in its parent and sizes scale with height / 720.

Props9

PropTypeDefault
text
string"Glyph"

The word to build. Short words show the construction best

fontUrl
stringInter ExtraBold (gstatic ttf)

URL of a .ttf, .otf or .woff file the outlines are parsed from

fontSize
number200

Font size in reference px at 720p

color
string"#fafafa"

Outline and fill color

guideColor
string"#0d99ff"

Guides, anchor borders and handles

guides
booleantrue

Draw the metric guides with their labels

keepPoints
booleanfalse

Keep anchors, handles and guides after the fill

speed
number1

Timeline speed multiplier

className
string—

Optional className passed to the wrapper

  • textstring

    The word to build. Short words show the construction best

    Default"Glyph"

  • fontUrlstring

    URL of a .ttf, .otf or .woff file the outlines are parsed from

    DefaultInter ExtraBold (gstatic ttf)

  • fontSizenumber

    Font size in reference px at 720p

    Default200

  • colorstring

    Outline and fill color

    Default"#fafafa"

  • guideColorstring

    Guides, anchor borders and handles

    Default"#0d99ff"

  • guidesboolean

    Draw the metric guides with their labels

    Defaulttrue

  • keepPointsboolean

    Keep anchors, handles and guides after the fill

    Defaultfalse

  • speednumber

    Timeline speed multiplier

    Default1

  • classNamestring

    Optional className passed to the wrapper