Glyph Anatomy
Font editor animation for Remotion: metric guidelines, anchor points and Bezier handles pull a word's outlines into curves before the letters fill. For design and type tools.
In Remotion, Glyph Anatomy constructs a word the way a font editor shows it: metric guidelines draw across, anchor points pop along each contour, and Bézier handles pull straight segments into curves before the letters fill in. Use it for a design tool or type product, a course, a talk or a type specimen.
$ pnpm dlx shadcn@latest add @remocn/glyph-anatomyHow to build this in Remotion
You don't have to parse glyphs and animate them with @remotion/paths yourself. Install the component:
npx shadcn@latest add @remocn/glyph-anatomyIt reads the real outlines of the font with opentype.js, converts TrueType quadratic curves to cubics so each curve shows one handle on each end, and animates guides, anchors and handles with interpolate() and Easing. The font file is fetched while delayRender() holds the render, and continueRender() releases it once the font is parsed, so no frame renders before the outlines exist.
Good to know
- Length: 66 frames of motion at 30 fps (132 at 60 fps) with the default props. The demo plays 96 frames, which adds a hold: frames past the end of the motion hold the final frame. The Usage example below is a 60 fps composition, so the numbers it hands to Remotion are doubled, see Frame rate.
- Installs:
remotion,opentype.js,@remotion/google-fontsfrom npm, plus the remocn helpersframe-rate,timeline. The shadcn CLI copies the source into your project. - Font: the outlines come from
fontUrl, Inter ExtraBold from Google Fonts' static CDN by default, so the default needs network access at render time.fontUrlaccepts any.ttf,.otfor.woffURL; for offline renders put the file inpublic/and passfontUrl={staticFile("MyFont.ttf")}. The small labels use Inter through@remotion/google-fonts. keepPointskeeps the anchors, handles and guides on screen after the fill;guides={false}drops the metric lines.
Usage
// 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={192}
fps={60}
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
| Prop | Type | Default |
|---|---|---|
| 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
Default
Inter ExtraBold (gstatic ttf) - fontSizenumber
Font size in reference px at 720p
Default
200 - colorstring
Outline and fill color
Default
"#fafafa" - guideColorstring
Guides, anchor borders and handles
Default
"#0d99ff" - guidesboolean
Draw the metric guides with their labels
Default
true - keepPointsboolean
Keep anchors, handles and guides after the fill
Default
false - speednumber
Timeline speed multiplier
Default
1 - classNamestring
Optional className passed to the wrapper
Common questions
How do I animate a word in Remotion like a font editor, with guidelines, anchor points and Bézier handles?
Install Glyph Anatomy with npx shadcn@latest add @remocn/glyph-anatomy and pass text. Guides draw, anchors pop along the contours, handles pull the segments into curves, and the glyphs fill.
Does it work without network access?
Yes, if you serve the font yourself: pass a local file through fontUrl with staticFile(). The default Inter URL is fetched from Google's CDN.
Does the render wait for the font?
Yes. The component calls delayRender() until the font file is fetched and parsed.
Related effects
- Outline Trace: the outline draws itself without points or handles.
- Selection Snap: a design-tool selection box around the word instead of its construction.
- Soft Blur In: a quiet reveal.
- Kerning Snap: letters snap into proper kerning, for a typesetting beat.