Skip to content

🎥 Make videos programmatically with React

Format Google Fonts API fields as code

Jonny Burgerf79622577ac0
diff --git a/packages/docs/docs/google-fonts/get-info.mdx b/packages/docs/docs/google-fonts/get-info.mdx
index a66d6efb30..b4d3f6b1d3 100644
--- a/packages/docs/docs/google-fonts/get-info.mdx
+++ b/packages/docs/docs/google-fonts/get-info.mdx
@@ -47,35 +47,35 @@ An object containing metadata about the font.
}
```
-### fontFamily
+### `fontFamily`
The font family name.
-### importName
+### `importName`
The name used to import the generated font module.
-### version
+### `version`
The Google Fonts version identifier.
-### url
+### `url`
The Google Fonts CSS URL for the static font variants.
-### unicodeRanges
+### `unicodeRanges`
The Unicode range covered by each character subset.
-### fonts
+### `fonts`
The source URL of each available combination of style, weight and character subset.
-### subsets
+### `subsets`
The character subsets supported by the font.
-### variable?<AvailableFrom v="4.0.525" />
+### `variable?`<AvailableFrom v="4.0.525" />
For fonts that support variable axes, this property contains the variable font metadata. It is omitted for non-variable fonts.
@@ -90,15 +90,15 @@ if (variable) {
}
```
-#### axes
+#### `axes`
An object containing the minimum and maximum value of each variation axis.
-#### fontFaces
+#### `fontFaces`
The style, weight range, stretch range, character subset, Unicode range and source URL of each variable font face.
-#### url
+#### `url`
The Google Fonts CSS URL used to retrieve the variable font faces.
diff --git a/packages/docs/docs/google-fonts/load-font.mdx b/packages/docs/docs/google-fonts/load-font.mdx
index d08a6e5eda..fd8c30a1ae 100644
--- a/packages/docs/docs/google-fonts/load-font.mdx
+++ b/packages/docs/docs/google-fonts/load-font.mdx
@@ -95,25 +95,25 @@ The `style` argument is optional. In Remotion 4.0, if no arguments are passed, a
From [v5.0](/docs/5-0-migration), `options.weights` and `options.subsets` are required and must be non-empty arrays.
-### style
+### `style`
The font style we want to load. While each font has a different set of styles, common options are: `normal`, `italic` etc.
-### options
+### `options`
-#### weights?
+#### `weights?`
Array of weights that should be loaded. Optional in v4.x. Required from v5.0.
-#### subsets?
+#### `subsets?`
Array of font subsets that should be loaded. Optional in v4.x. Required from v5.0.
-#### document?
+#### `document?`
Allows you to specify a [`Document`](https://developer.mozilla.org/en-US/docs/Web/API/Document?retiredLocale=de). If you want to inject the fonts into an iframe, you want to give it a ref and pass `iframeRef.contentDocument` to this parameter. By default, the global `window.document` is used.
-#### ignoreTooManyRequestsWarning?<AvailableFrom v="4.0.283" />
+#### `ignoreTooManyRequestsWarning?`<AvailableFrom v="4.0.283" />
If more than 20 network requests are made to load the font, then a warning will be printed to the console.
You can disable that warning by setting this option.
@@ -122,11 +122,11 @@ You can disable that warning by setting this option.
An object with the following properties:
-### fontFamily
+### `fontFamily`
The font family name, used as the `fontFamily` CSS property.
-### fonts
+### `fonts`
Variant information about the font.
@@ -141,7 +141,7 @@ Variant information about the font.
}
```
-### unicodeRanges
+### `unicodeRanges`
Unicode range information about the font.
diff --git a/packages/docs/docs/google-fonts/load-variable-font-from-info.mdx b/packages/docs/docs/google-fonts/load-variable-font-from-info.mdx
index d75a64cf14..d0e3e27731 100644
--- a/packages/docs/docs/google-fonts/load-variable-font-from-info.mdx
+++ b/packages/docs/docs/google-fonts/load-variable-font-from-info.mdx
@@ -32,25 +32,25 @@ waitUntilDone();
## Arguments
-### info
+### `info`
Font metadata returned by [`getInfo()`](/docs/google-fonts/get-info). The font must include variable font information.
-### style
+### `style`
The variable font style to load, such as `normal` or `italic`.
-### options
+### `options`
-#### subsets
+#### `subsets`
The character subsets to load. At least one subset is required.
-#### document?
+#### `document?`
The document into which the font should be added. By default, the global `window.document` is used.
-#### ignoreTooManyRequestsWarning?
+#### `ignoreTooManyRequestsWarning?`
Set this to `true` to disable the warning emitted when loading more than 20 subset files.
diff --git a/packages/docs/docs/google-fonts/load-variable-font.mdx b/packages/docs/docs/google-fonts/load-variable-font.mdx
index d1b675473a..81ad152b49 100644
--- a/packages/docs/docs/google-fonts/load-variable-font.mdx
+++ b/packages/docs/docs/google-fonts/load-variable-font.mdx
@@ -45,35 +45,35 @@ Variable fonts combine variation axes, but Google may still provide separate fil
## Arguments
-### style
+### `style`
The style to load, such as `normal` or `italic`.
-### options
+### `options`
-#### subsets
+#### `subsets`
The character subsets to load. At least one subset is required.
-#### document?
+#### `document?`
The document into which the font should be added. By default, the global `window.document` is used.
-#### ignoreTooManyRequestsWarning?
+#### `ignoreTooManyRequestsWarning?`
Set this to `true` to disable the warning emitted when loading more than 20 subset files.
## Return value
-### fontFamily
+### `fontFamily`
The font family name, for use with the `fontFamily` CSS property.
-### axes
+### `axes`
The minimum and maximum value of each available variation axis.
-### waitUntilDone()
+### `waitUntilDone()`
Returns a promise that resolves once the font files have loaded.