🎥 Make videos programmatically with React
chore: update using-font docs
Hidayatullah6324393aa841
diff --git a/packages/docs/docs/using-fonts.md b/packages/docs/docs/using-fonts.mdindex f40cf3b3bb..e6a92ea2b6 100644--- a/packages/docs/docs/using-fonts.md+++ b/packages/docs/docs/using-fonts.md@@ -5,7 +5,7 @@ id: fontsHere are some ways how you can use custom fonts in Remotion.-## Google Fonts+## Google Fonts using CSSImport the CSS that Google Fonts gives you. From version 2.2 on, Remotion will automatically wait until the fonts are loaded.@@ -21,6 +21,18 @@ const MyComp: React.FC = () => {};```+## Google Fonts using `@remotion/google-fonts`++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";++const GoogleFontsComp: React.FC = () => {+ return <div style={{ fontFamily: family }}>Hello, Google Fonts</div>;+};+```+## Example using local fontsPut the font into your `public/` folder and use the [`staticFile()`](/docs/staticfile) API to load the font. Use the `FontFace` browser API to load the font. [Click here](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face) to read the syntax that can be used for the Font Face API.