Skip to content

πŸŽ₯ Make videos programmatically with React

google font loading error troubleshooting section in the docs

Igor Samokhovets0e8b21229113
diff --git a/packages/docs/docs/troubleshooting/font-loading-errors.mdx b/packages/docs/docs/troubleshooting/font-loading-errors.mdx
new file mode 100644
index 0000000000..f9f187c61e
--- /dev/null
+++ b/packages/docs/docs/troubleshooting/font-loading-errors.mdx
@@ -0,0 +1,36 @@
+---
+image: /generated/articles-docs-troubleshooting-font-loading-errors.png
+id: font-loading-errors
+title: 'Font loading errors'
+sidebar_label: Font loading errors
+crumb: 'Troubleshooting'
+---
+
+## Render timeout when loading Google Fonts
+
+When using `@remotion/google-fonts`, you may encounter timeout errors like:
+
+```diff
+- A delayRender() "Fetching Inter font {"style":"normal","weight":"100","subset":"cyrillic-ext"}" was called but not cleared after 58000ms.
+```
+
+### Problem
+
+By default, `loadFont()` attempts to load all available font weights and character subsets, which can cause timeouts.
+
+### Solution
+
+Only load the specific font weights and character subsets that your project needs:
+
+```tsx
+import {loadFont} from '@remotion/google-fonts/Inter';
+
+// ❌ Avoid: Loading all weights and subsets
+loadFont();
+
+// βœ… Recommended: Load only required weights and subsets
+loadFont('normal', {
+ subsets: ['latin'],
+ weights: ['400', '700'], // Only load regular (400) and bold (700)
+});
+```
diff --git a/packages/docs/sidebars.js b/packages/docs/sidebars.js
index 9a15a13a44..9f052873b0 100644
--- a/packages/docs/sidebars.js
+++ b/packages/docs/sidebars.js
@@ -1118,6 +1118,7 @@ module.exports = {
'troubleshooting/could-not-find-executable-to-run',
'troubleshooting/stuck-render',
'troubleshooting/no-frame-found-at-position',
+ 'troubleshooting/font-loading-errors',
],
},
{