fonts — Claude Code rule: what it does, how to install
Guides Claude Code on loading Google Fonts and local font assets in Remotion video projects without render glitches.
no license ★ 849 updated 2026-01-24
.claude/rules/fonts.mdWhat fonts does
This rule tells the agent how to handle typography in Remotion compositions. When working with Google Fonts, it enforces the type-safe @remotion/google-fonts package, advising specific subsets and weights in loadFont() to keep payload sizes small.
For self-hosted font assets, the guide routes files into public/ and links them via staticFile() with @remotion/fonts. Trying to render without running npx remotion add for the respective package will trigger missing module errors during video generation.
What it helps with
- load Google Fonts inside Remotion video compositions
- configure local woff2 font files from the public directory
- limit font weights and character subsets to keep assets light
- block frame rendering until typography assets finish loading
Example prompts for the agent
- Add Google Font Montserrat to my Remotion title screen
- Load a local woff2 font file for this video scene
- Set up font loading with specific weights and wait for it to be ready
How to install fonts
Manually: put the files in place
.claude/rules/fonts.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/fonts.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/fonts.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/fonts.mdManually: put the files in place
.clinerules/fonts.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about fonts
How to install fonts in Claude Code?
Save the rule contents into the file .claude/rules/fonts.md.
What does the fonts rule do?
It provides conventions for importing Google Fonts and local typography assets cleanly in Remotion code.
Which dependencies are required?
Projects need @remotion/google-fonts for Google directory fonts or @remotion/fonts for local files, installed via remotion add.