Skip to content

🎥 Make videos programmatically with React

reference the google loading directly in the delayRender label

Igor Samokhovetsdca8736a9044
diff --git a/packages/google-fonts/src/base.ts b/packages/google-fonts/src/base.ts
index 408928fb36..cdc56532d4 100644
--- a/packages/google-fonts/src/base.ts
+++ b/packages/google-fonts/src/base.ts
@@ -93,14 +93,20 @@ export const loadFonts = (
continue;
}
- const handle = delayRender(
- `Fetching ${meta.fontFamily} font ${JSON.stringify({
- style,
- weight,
- subset,
- })}`,
- {timeoutInMilliseconds: 60000},
- );
+ const weightsAndSubsetsAreSpecified =
+ options?.weights && options?.subsets;
+
+ const baseLabel = `Fetching ${meta.fontFamily} font ${JSON.stringify({
+ style,
+ weight,
+ subset,
+ })}`;
+
+ const label = weightsAndSubsetsAreSpecified
+ ? baseLabel
+ : `${baseLabel}. This might be caused by loading too many font variations. Read more: https://www.remotion.dev/docs/troubleshooting/font-loading-errors#render-timeout-when-loading-google-fonts`;
+
+ const handle = delayRender(label, {timeoutInMilliseconds: 60000});
fontsLoaded++;
// Create font-face