fonts

fonts is a cursor rule for Cursor from ratnesh-maurya/cursor-claude-personas. It costs 9 tokens per session (909 once invoked), scanned A, original, MIT.

A Remotion guide for loading Google Fonts and local fonts into rendered videos. Remotion is a React-based video tool.

In plain words
What is it for?
Use it when adding branded typography or specific font families and weights to video compositions.
Why use it?
It helps ensure text uses the intended font before rendering finishes.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding branded typography or specific font families and weights to video compositions.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/ratnesh-maurya/cursor-claude-personas/rules-fonts
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/ratnesh-maurya/cursor-claude-personas

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for fonts

README.md
[![agentmods](https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts/github.svg)](https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts)
Your own site
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for fonts

Your own site · 80×15
<a href="https://agentmods.dev/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts"><img src="https://agentmods.dev/badge/rules/ratnesh-maurya/cursor-claude-personas/rules-fonts.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 9 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 909 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00009 $0.00909
Opus 5 $0.00005 $0.00454
Sonnet 5 $0.00002 $0.00182
Haiku 4.5 $0.00001 $0.00091

Measured 7d ago against content hash 1749e4cf82e8, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-11, from the pricing page.

Security

Grade A, and why

fonts scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 7d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

3d-frontend-developer/.cursor/rules/rules--fonts.mdc · 153 lines

How it starts

The opening of the file, as written. The whole thing — 153 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Using fonts in Remotion

Google Fonts with @remotion/google-fonts

The recommended way to use Google Fonts. It's type-safe and automatically blocks rendering until the font is ready.

Prerequisites

First, the @remotion/google-fonts package needs to be installed. If it is not installed, use the following command:

npx remotion add @remotion/google-fonts # If project uses npm
bunx remotion add @remotion/google-fonts # If project uses bun
yarn remotion add @remotion/google-fonts # If project uses yarn
pnpm exec remotion add @remotion/google-fonts # If project uses pnpm
import { loadFont } from "@remotion/google-fonts/Lobster";

const { fontFamily } = loadFont();

export const MyComposition = () => {
  return <div style={{ fontFamily }}>Hello World</div>;
};

Preferrably, specify only needed weights and subsets to reduce file size:

import { loadFont } from "@remotion/google-fonts/Roboto";

const { fontFamily } = loadFont("normal", {
  weights: ["400", "700"],
  subsets: ["latin"],
});

Waiting for font to load

Use waitUntilDone() if you need to know when the font is ready:

import { loadFont } from "@remotion/google-fonts/Lobster";

const { fontFamily, waitUntilDone } = loadFont();

await waitUntilDone();

Local fonts with @remotion/fonts

For local font files, use the @remotion/fonts package.

Prerequisites

First, install @remotion/fonts:

npx remotion add @remotion/fonts # If project uses npm
bunx remotion add @remotion/fonts # If project uses bun
yarn remotion add @remotion/fonts # If project uses yarn
pnpm exec remotion add @remotion/fonts # If project uses pnpm

Loading a local font

Place your font file in the public/ folder and use loadFont():

import { loadFont } from "@remotion/fonts";
import { staticFile } from "remotion";

await loadFont({
  family: "MyFont",
  url: staticFile("MyFont-Regular.woff2"),
});

export const MyComposition = () => {
  return <div style={{ fontFamily: "MyFont" }}>Hello World</div>;
};

Read the full file on GitHub · 153 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 7d ago First seen · 153 lines · 9 tokens per session scan A 1749e4cf82e8

Subscribe to this mod's changes

fonts is a cursor rule published in the GitHub repository ratnesh-maurya/cursor-claude-personas (8 stars, last pushed 5mo ago), licensed MIT. It adds 9 tokens to every session and 909 once invoked, about $0.0000 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.