Production-ready animations, transitions, backgrounds, and scenes for Remotion
TypeScript ai-agentsclaude-codedemo-videomcpmcp-servermodel-context-protocolmotion-designproduct-demoreactremotionshadcnvideo
feat: render font family
dev_wandry63b0b487c363
diff --git a/bun.lock b/bun.lockindex 5f10cc1d..8b83dd39 100644--- a/bun.lock+++ b/bun.lock@@ -10,6 +10,7 @@"@react-three/fiber": "^9.3.0","@react-three/postprocessing": "^3.0.4","@remotion/bundler": "4.0.473",+ "@remotion/google-fonts": "4.0.473","@remotion/player": "4.0.473","@remotion/renderer": "4.0.473","class-variance-authority": "^0.7.1",@@ -455,6 +456,8 @@"@remotion/compositor-win32-x64-msvc": ["@remotion/[email protected]", "", { "os": "win32", "cpu": "x64" }, "sha512-J69HIENHpH1m8I85kTe111viqB5AGgKJdTCSKp4mGBxM95IL4nydzrYxVd91BvWjanQfVVq1C3voaF8YLwkT7A=="],+ "@remotion/google-fonts": ["@remotion/[email protected]", "", { "dependencies": { "remotion": "4.0.473" } }, "sha512-KmTjSpy43OKCLZaGC55fYU2pC+PmYOdR1l5RsJUMK9F5EK7qj8kkCrW3IHzbnJyuJIqu2n1bpkqZA74pH1+30Q=="],+"@remotion/licensing": ["@remotion/[email protected]", "", {}, "sha512-BBw6SuEWuUD/lYXbLKEC0TTUzW7aLsO0X72pG38W1dOUyfU2KZYYfWGZkd+ermZTWWJ8cW+mevIwloUGk7FRaQ=="],"@remotion/media-parser": ["@remotion/[email protected]", "", {}, "sha512-jajhgumDSdnM/CUb3lZgae7D2pfioz9rczc6tLaRNP28IG3d2foQ0jP8INfCdMsOszCD0wKw4RHe0m5GKRxhTg=="],diff --git a/package.json b/package.jsonindex a4527df7..3f62ea79 100644--- a/package.json+++ b/package.json@@ -19,6 +19,7 @@"@react-three/fiber": "^9.3.0","@react-three/postprocessing": "^3.0.4","@remotion/bundler": "4.0.473",+ "@remotion/google-fonts": "4.0.473","@remotion/player": "4.0.473","@remotion/renderer": "4.0.473","class-variance-authority": "^0.7.1",diff --git a/registry.json b/registry.jsonindex cc2c6807..6b396c86 100644--- a/registry.json+++ b/registry.json@@ -904,7 +904,7 @@"type": "registry:component","title": "GitHub Stars","description": "Inertial fly-through of a repo's stargazers with a synced count-up odometer that locks on the total. Horizontal 16:9 or vertical 9:16.",- "dependencies": ["remotion", "date-fns"],+ "dependencies": ["remotion", "date-fns", "@remotion/google-fonts"],"files": [{"path": "registry/remocn/github-stars/index.tsx",diff --git a/registry/remocn/github-stars/index.tsx b/registry/remocn/github-stars/index.tsxindex fe836363..27e41d19 100644--- a/registry/remocn/github-stars/index.tsx+++ b/registry/remocn/github-stars/index.tsx@@ -3,6 +3,8 @@import { format, parseISO } from "date-fns";import type React from "react";import { useState } from "react";+import { loadFont as loadSans } from "@remotion/google-fonts/Manrope";+import { loadFont as loadMono } from "@remotion/google-fonts/JetBrainsMono";import {AbsoluteFill,Easing,@@ -577,8 +579,15 @@ export const SAMPLE_STARGAZERS: Stargazer[] = [},];-const FONT_FAMILY =- "var(--font-geist-sans), -apple-system, BlinkMacSystemFont, sans-serif";+// Load fonts INSIDE the composition (via @remotion/google-fonts, which waits for+// the font with delayRender before rendering frames). Server renders run in a+// bare headless Chromium with no app CSS / `--font-*` vars, so without this the+// MP4 falls back to the default sans-serif. Manrope for UI text, JetBrains Mono+// for the numeric star counter (odometer).+const { fontFamily: SANS_FAMILY } = loadSans();+const { fontFamily: MONO_FAMILY } = loadMono();++const FONT_FAMILY = SANS_FAMILY;interface Theme {bg: string;@@ -897,7 +906,7 @@ function Odometer({fontSize,fontWeight: 800,color,- fontFamily: FONT_FAMILY,+ fontFamily: MONO_FAMILY,fontVariantNumeric: "tabular-nums",letterSpacing: "-0.03em",lineHeight: 1,@@ -1030,7 +1039,7 @@ function Row({alignItems: "center",gap: 8,color: theme.fgMuted,- fontFamily: FONT_FAMILY,+ fontFamily: MONO_FAMILY,fontSize: 18,fontVariantNumeric: "tabular-nums",flexShrink: 0,