Skip to content

🎥 Make videos programmatically with React

chore: update google fonts docs to match new code

Hidayatullah55d38da0168f
diff --git a/packages/docs/docs/google-fonts/index.md b/packages/docs/docs/google-fonts/index.md
index 37d52153a8..e8add68a89 100644
--- a/packages/docs/docs/google-fonts/index.md
+++ b/packages/docs/docs/google-fonts/index.md
@@ -55,7 +55,7 @@ Before using it, we need to import the fonts we want first, there are 2 ways to
**Import one font**
```tsx
-import { loadFont, family } from "@remotion/google-fonts/TitanOne";
+import { loadFont, fontFamily } from "@remotion/google-fonts/TitanOne";
```
**Import multiple fonts**
@@ -104,7 +104,7 @@ export const GoogleFontsDemoComposition = () => {
style={{
justifyContent: "center",
alignItems: "center",
- fontFamily: TitanOne.family,
+ fontFamily: TitanOne.fontFamily,
}}
>
<div>Hallo Google Fonts</div>
@@ -122,10 +122,10 @@ Each font will export these variables:
Load font with selected style, weights, and subsets. See [loadFont()](./load-font.md).
-### family
+### fontFamily
The font family name, so we can pass this instead hardcode string.
-### meta
+### info
Complete information about the current font.
diff --git a/packages/docs/docs/google-fonts/load-font.md b/packages/docs/docs/google-fonts/load-font.md
index 083f231957..8038a7c380 100644
--- a/packages/docs/docs/google-fonts/load-font.md
+++ b/packages/docs/docs/google-fonts/load-font.md
@@ -17,7 +17,7 @@ const loadFont: (
## Example
```tsx
-import { loadFont, family } from "@remotion/google-fonts/Lobster";
+import { loadFont, fontFamily } from "@remotion/google-fonts/Lobster";
loadFont("normal", {
weights: ["400"],
@@ -30,7 +30,7 @@ export const GoogleFontsExample: React.FC = () => {
style={{
justifyContent: 'center',
alignItems: 'center',
- fontFamily: family,
+ fontFamily: fontFamily,
fontSize: 280,
}}
>
diff --git a/packages/docs/docs/using-fonts.md b/packages/docs/docs/using-fonts.md
index e6a92ea2b6..0781ecddd3 100644
--- a/packages/docs/docs/using-fonts.md
+++ b/packages/docs/docs/using-fonts.md
@@ -26,10 +26,10 @@ const MyComp: React.FC = () => {
Instead of writing separate CSS files to import Google Fonts, we can use [`@remotion/google-fonts`](./google-fonts/index.md) to easily integrate it in Remotion and get some TypeScript auto-complete feature.
```tsx title="MyComp.tsx"
-import { family, loadFont } from "@remotion/google-fonts/TitanOne";
+import { fontFamily, loadFont } from "@remotion/google-fonts/TitanOne";
const GoogleFontsComp: React.FC = () => {
- return <div style={{ fontFamily: family }}>Hello, Google Fonts</div>;
+ return <div style={{ fontFamily: fontFamily }}>Hello, Google Fonts</div>;
};
```