Build a Google Font picker
To show various Google fonts in a font picker and load them once the user selects them, first install @remotion/google-fonts
(at least v3.3.64).
This feature is only available if @remotion/google-fonts
is imported as an ES Module.
If it is imported as a CommonJS module instead, loading a font will throw an error.
Call getAvailableFonts()
to get a list of Google Fonts and call .load()
to load the metadata of a font.
Afterwards, on the object you retrieve:
- You can call
getInfo()
to retrieve available styles and weights. - You can call
loadFont()
to load the font itself.
Use the fontFamily
CSS property to apply a font.
Remember that if you want to render a video with said font, you also need to load the font inside the Remotion video. You can do it in the same way, by looping through the available fonts, finding the font you want to load and then load it.
Show all fonts in a font picker
The following snippet renders a dropdown with all Google Fonts, and loads one it it has been selected. The list is approximately 1400 fonts.
tsx
import {getAvailableFonts } from "@remotion/google-fonts";importReact , {useCallback } from "react";export constFontPicker :React .FC = () => {constnewFonts =getAvailableFonts ();constonChange =useCallback (async (e :React .ChangeEvent <HTMLSelectElement >) => {constfonts =newFonts [e .target .selectedIndex ];// Load font informationconstloaded = awaitfonts .load ();// Load the font itselfconst {fontFamily , ...otherInfo } =loaded .loadFont ();// Or get metadata about the fontconstinfo =loaded .getInfo ();conststyles =Object .keys (info .fonts );console .log ("Font",info .fontFamily , " Styles",styles );for (conststyle ofstyles ) {constweightObject =info .fonts [style as keyof typeofinfo .fonts ];constweights =Object .keys (weightObject );console .log ("- Style",style , "supports weights",weights );for (constweight ofweights ) {constscripts =Object .keys (weightObject [weight ]);console .log ("-- Weight",weight , "supports scripts",scripts );}}},[newFonts ],);return (<div ><select onChange ={onChange }>{newFonts .map ((f ) => {return (<option key ={f .importName }value ={f .importName }>{f .fontFamily }</option >);})}</select ></div >);};
Show only the 250 most popular Google Fonts
To reduce bundle size, you can limit the selection. Instead of calling getAvailableFonts()
, create a file with the following contents and use it as the fonts array:
ts
import type {GoogleFont } from "@remotion/google-fonts";export consttop250 = [{family : "ABeeZee",load : () => import("@remotion/google-fonts/ABeeZee") asPromise <GoogleFont >,},{family : "Abel",load : () => import("@remotion/google-fonts/Abel") asPromise <GoogleFont >,},{family : "Abril Fatface",load : () =>import("@remotion/google-fonts/AbrilFatface") asPromise <GoogleFont >,},{family : "Acme",load : () => import("@remotion/google-fonts/Acme") asPromise <GoogleFont >,},{family : "Alata",load : () => import("@remotion/google-fonts/Alata") asPromise <GoogleFont >,},{family : "Albert Sans",load : () =>import("@remotion/google-fonts/AlbertSans") asPromise <GoogleFont >,},{family : "Alegreya",load : () =>import("@remotion/google-fonts/Alegreya") asPromise <GoogleFont >,},{family : "Alegreya Sans",load : () =>import("@remotion/google-fonts/AlegreyaSans") asPromise <GoogleFont >,},{family : "Alegreya Sans SC",load : () =>import("@remotion/google-fonts/AlegreyaSansSC") asPromise <GoogleFont >,},{family : "Alfa Slab One",load : () =>import("@remotion/google-fonts/AlfaSlabOne") asPromise <GoogleFont >,},{family : "Alice",load : () => import("@remotion/google-fonts/Alice") asPromise <GoogleFont >,},{family : "Almarai",load : () => import("@remotion/google-fonts/Almarai") asPromise <GoogleFont >,},{family : "Amatic SC",load : () =>import("@remotion/google-fonts/AmaticSC") asPromise <GoogleFont >,},{family : "Amiri",load : () => import("@remotion/google-fonts/Amiri") asPromise <GoogleFont >,},{family : "Antic Slab",load : () =>import("@remotion/google-fonts/AnticSlab") asPromise <GoogleFont >,},{family : "Anton",load : () => import("@remotion/google-fonts/Anton") asPromise <GoogleFont >,},{family : "Architects Daughter",load : () =>import("@remotion/google-fonts/ArchitectsDaughter") asPromise <GoogleFont >,},{family : "Archivo",load : () => import("@remotion/google-fonts/Archivo") asPromise <GoogleFont >,},{family : "Archivo Black",load : () =>import("@remotion/google-fonts/ArchivoBlack") asPromise <GoogleFont >,},{family : "Archivo Narrow",load : () =>import("@remotion/google-fonts/ArchivoNarrow") asPromise <GoogleFont >,},{family : "Arimo",load : () => import("@remotion/google-fonts/Arimo") asPromise <GoogleFont >,},{family : "Arsenal",load : () => import("@remotion/google-fonts/Arsenal") asPromise <GoogleFont >,},{family : "Arvo",load : () => import("@remotion/google-fonts/Arvo") asPromise <GoogleFont >,},{family : "Asap",load : () => import("@remotion/google-fonts/Asap") asPromise <GoogleFont >,},{family : "Asap Condensed",load : () =>import("@remotion/google-fonts/AsapCondensed") asPromise <GoogleFont >,},{family : "Assistant",load : () =>import("@remotion/google-fonts/Assistant") asPromise <GoogleFont >,},{family : "Barlow",load : () => import("@remotion/google-fonts/Barlow") asPromise <GoogleFont >,},{family : "Barlow Condensed",load : () =>import("@remotion/google-fonts/BarlowCondensed") asPromise <GoogleFont >,},{family : "Barlow Semi Condensed",load : () =>import("@remotion/google-fonts/BarlowSemiCondensed") asPromise <GoogleFont >,},{family : "Be Vietnam Pro",load : () =>import("@remotion/google-fonts/BeVietnamPro") asPromise <GoogleFont >,},{family : "Bebas Neue",load : () =>import("@remotion/google-fonts/BebasNeue") asPromise <GoogleFont >,},{family : "Bitter",load : () => import("@remotion/google-fonts/Bitter") asPromise <GoogleFont >,},{family : "Black Ops One",load : () =>import("@remotion/google-fonts/BlackOpsOne") asPromise <GoogleFont >,},{family : "Bodoni Moda",load : () =>import("@remotion/google-fonts/BodoniModa") asPromise <GoogleFont >,},{family : "Bree Serif",load : () =>import("@remotion/google-fonts/BreeSerif") asPromise <GoogleFont >,},{family : "Bungee",load : () => import("@remotion/google-fonts/Bungee") asPromise <GoogleFont >,},{family : "Cabin",load : () => import("@remotion/google-fonts/Cabin") asPromise <GoogleFont >,},{family : "Cairo",load : () => import("@remotion/google-fonts/Cairo") asPromise <GoogleFont >,},{family : "Cantarell",load : () =>import("@remotion/google-fonts/Cantarell") asPromise <GoogleFont >,},{family : "Cardo",load : () => import("@remotion/google-fonts/Cardo") asPromise <GoogleFont >,},{family : "Catamaran",load : () =>import("@remotion/google-fonts/Catamaran") asPromise <GoogleFont >,},{family : "Caveat",load : () => import("@remotion/google-fonts/Caveat") asPromise <GoogleFont >,},{family : "Chakra Petch",load : () =>import("@remotion/google-fonts/ChakraPetch") asPromise <GoogleFont >,},{family : "Changa",load : () => import("@remotion/google-fonts/Changa") asPromise <GoogleFont >,},{family : "Chivo",load : () => import("@remotion/google-fonts/Chivo") asPromise <GoogleFont >,},{family : "Cinzel",load : () => import("@remotion/google-fonts/Cinzel") asPromise <GoogleFont >,},{family : "Comfortaa",load : () =>import("@remotion/google-fonts/Comfortaa") asPromise <GoogleFont >,},{family : "Commissioner",load : () =>import("@remotion/google-fonts/Commissioner") asPromise <GoogleFont >,},{family : "Concert One",load : () =>import("@remotion/google-fonts/ConcertOne") asPromise <GoogleFont >,},{family : "Cookie",load : () => import("@remotion/google-fonts/Cookie") asPromise <GoogleFont >,},{family : "Cormorant",load : () =>import("@remotion/google-fonts/Cormorant") asPromise <GoogleFont >,},{family : "Cormorant Garamond",load : () =>import("@remotion/google-fonts/CormorantGaramond") asPromise <GoogleFont >,},{family : "Courgette",load : () =>import("@remotion/google-fonts/Courgette") asPromise <GoogleFont >,},{family : "Crete Round",load : () =>import("@remotion/google-fonts/CreteRound") asPromise <GoogleFont >,},{family : "Crimson Pro",load : () =>import("@remotion/google-fonts/CrimsonPro") asPromise <GoogleFont >,},{family : "Crimson Text",load : () =>import("@remotion/google-fonts/CrimsonText") asPromise <GoogleFont >,},{family : "Cuprum",load : () => import("@remotion/google-fonts/Cuprum") asPromise <GoogleFont >,},{family : "DM Sans",load : () => import("@remotion/google-fonts/DMSans") asPromise <GoogleFont >,},{family : "DM Serif Display",load : () =>import("@remotion/google-fonts/DMSerifDisplay") asPromise <GoogleFont >,},{family : "DM Serif Text",load : () =>import("@remotion/google-fonts/DMSerifText") asPromise <GoogleFont >,},{family : "Dancing Script",load : () =>import("@remotion/google-fonts/DancingScript") asPromise <GoogleFont >,},{family : "Didact Gothic",load : () =>import("@remotion/google-fonts/DidactGothic") asPromise <GoogleFont >,},{family : "Domine",load : () => import("@remotion/google-fonts/Domine") asPromise <GoogleFont >,},{family : "Dosis",load : () => import("@remotion/google-fonts/Dosis") asPromise <GoogleFont >,},{family : "EB Garamond",load : () =>import("@remotion/google-fonts/EBGaramond") asPromise <GoogleFont >,},{family : "Eczar",load : () => import("@remotion/google-fonts/Eczar") asPromise <GoogleFont >,},{family : "El Messiri",load : () =>import("@remotion/google-fonts/ElMessiri") asPromise <GoogleFont >,},{family : "Electrolize",load : () =>import("@remotion/google-fonts/Electrolize") asPromise <GoogleFont >,},{family : "Encode Sans",load : () =>import("@remotion/google-fonts/EncodeSans") asPromise <GoogleFont >,},{family : "Encode Sans Condensed",load : () =>import("@remotion/google-fonts/EncodeSansCondensed") asPromise <GoogleFont >,},{family : "Exo",load : () => import("@remotion/google-fonts/Exo") asPromise <GoogleFont >,},{family : "Exo 2",load : () => import("@remotion/google-fonts/Exo2") asPromise <GoogleFont >,},{family : "Figtree",load : () => import("@remotion/google-fonts/Figtree") asPromise <GoogleFont >,},{family : "Fira Sans",load : () =>import("@remotion/google-fonts/FiraSans") asPromise <GoogleFont >,},{family : "Fira Sans Condensed",load : () =>import("@remotion/google-fonts/FiraSansCondensed") asPromise <GoogleFont >,},{family : "Fjalla One",load : () =>import("@remotion/google-fonts/FjallaOne") asPromise <GoogleFont >,},{family : "Francois One",load : () =>import("@remotion/google-fonts/FrancoisOne") asPromise <GoogleFont >,},{family : "Frank Ruhl Libre",load : () =>import("@remotion/google-fonts/FrankRuhlLibre") asPromise <GoogleFont >,},{family : "Fraunces",load : () =>import("@remotion/google-fonts/Fraunces") asPromise <GoogleFont >,},{family : "Gelasio",load : () => import("@remotion/google-fonts/Gelasio") asPromise <GoogleFont >,},{family : "Gloria Hallelujah",load : () =>import("@remotion/google-fonts/GloriaHallelujah") asPromise <GoogleFont >,},{family : "Gothic A1",load : () =>import("@remotion/google-fonts/GothicA1") asPromise <GoogleFont >,},{family : "Great Vibes",load : () =>import("@remotion/google-fonts/GreatVibes") asPromise <GoogleFont >,},{family : "Gruppo",load : () => import("@remotion/google-fonts/Gruppo") asPromise <GoogleFont >,},{family : "Heebo",load : () => import("@remotion/google-fonts/Heebo") asPromise <GoogleFont >,},{family : "Hind",load : () => import("@remotion/google-fonts/Hind") asPromise <GoogleFont >,},{family : "Hind Madurai",load : () =>import("@remotion/google-fonts/HindMadurai") asPromise <GoogleFont >,},{family : "Hind Siliguri",load : () =>import("@remotion/google-fonts/HindSiliguri") asPromise <GoogleFont >,},{family : "IBM Plex Mono",load : () =>import("@remotion/google-fonts/IBMPlexMono") asPromise <GoogleFont >,},{family : "IBM Plex Sans",load : () =>import("@remotion/google-fonts/IBMPlexSans") asPromise <GoogleFont >,},{family : "IBM Plex Sans Arabic",load : () =>import("@remotion/google-fonts/IBMPlexSansArabic") asPromise <GoogleFont >,},{family : "IBM Plex Sans Condensed",load : () =>import("@remotion/google-fonts/IBMPlexSansCondensed") asPromise <GoogleFont >,},{family : "IBM Plex Serif",load : () =>import("@remotion/google-fonts/IBMPlexSerif") asPromise <GoogleFont >,},{family : "Inconsolata",load : () =>import("@remotion/google-fonts/Inconsolata") asPromise <GoogleFont >,},{family : "Indie Flower",load : () =>import("@remotion/google-fonts/IndieFlower") asPromise <GoogleFont >,},{family : "Inter",load : () => import("@remotion/google-fonts/Inter") asPromise <GoogleFont >,},{family : "Inter Tight",load : () =>import("@remotion/google-fonts/InterTight") asPromise <GoogleFont >,},{family : "Josefin Sans",load : () =>import("@remotion/google-fonts/JosefinSans") asPromise <GoogleFont >,},{family : "Josefin Slab",load : () =>import("@remotion/google-fonts/JosefinSlab") asPromise <GoogleFont >,},{family : "Jost",load : () => import("@remotion/google-fonts/Jost") asPromise <GoogleFont >,},{family : "Kalam",load : () => import("@remotion/google-fonts/Kalam") asPromise <GoogleFont >,},{family : "Kanit",load : () => import("@remotion/google-fonts/Kanit") asPromise <GoogleFont >,},{family : "Karla",load : () => import("@remotion/google-fonts/Karla") asPromise <GoogleFont >,},{family : "Kaushan Script",load : () =>import("@remotion/google-fonts/KaushanScript") asPromise <GoogleFont >,},{family : "Khand",load : () => import("@remotion/google-fonts/Khand") asPromise <GoogleFont >,},{family : "Lato",load : () => import("@remotion/google-fonts/Lato") asPromise <GoogleFont >,},{family : "League Spartan",load : () =>import("@remotion/google-fonts/LeagueSpartan") asPromise <GoogleFont >,},{family : "Lexend",load : () => import("@remotion/google-fonts/Lexend") asPromise <GoogleFont >,},{family : "Lexend Deca",load : () =>import("@remotion/google-fonts/LexendDeca") asPromise <GoogleFont >,},{family : "Libre Barcode 39",load : () =>import("@remotion/google-fonts/LibreBarcode39") asPromise <GoogleFont >,},{family : "Libre Baskerville",load : () =>import("@remotion/google-fonts/LibreBaskerville") asPromise <GoogleFont >,},{family : "Libre Caslon Text",load : () =>import("@remotion/google-fonts/LibreCaslonText") asPromise <GoogleFont >,},{family : "Libre Franklin",load : () =>import("@remotion/google-fonts/LibreFranklin") asPromise <GoogleFont >,},{family : "Lilita One",load : () =>import("@remotion/google-fonts/LilitaOne") asPromise <GoogleFont >,},{family : "Lobster",load : () => import("@remotion/google-fonts/Lobster") asPromise <GoogleFont >,},{family : "Lobster Two",load : () =>import("@remotion/google-fonts/LobsterTwo") asPromise <GoogleFont >,},{family : "Lora",load : () => import("@remotion/google-fonts/Lora") asPromise <GoogleFont >,},{family : "Luckiest Guy",load : () =>import("@remotion/google-fonts/LuckiestGuy") asPromise <GoogleFont >,},{family : "M PLUS 1p",load : () => import("@remotion/google-fonts/MPLUS1p") asPromise <GoogleFont >,},{family : "M PLUS Rounded 1c",load : () =>import("@remotion/google-fonts/MPLUSRounded1c") asPromise <GoogleFont >,},{family : "Macondo",load : () => import("@remotion/google-fonts/Macondo") asPromise <GoogleFont >,},{family : "Manrope",load : () => import("@remotion/google-fonts/Manrope") asPromise <GoogleFont >,},{family : "Marcellus",load : () =>import("@remotion/google-fonts/Marcellus") asPromise <GoogleFont >,},{family : "Martel",load : () => import("@remotion/google-fonts/Martel") asPromise <GoogleFont >,},{family : "Mate",load : () => import("@remotion/google-fonts/Mate") asPromise <GoogleFont >,},{family : "Mate SC",load : () => import("@remotion/google-fonts/MateSC") asPromise <GoogleFont >,},{family : "Maven Pro",load : () =>import("@remotion/google-fonts/MavenPro") asPromise <GoogleFont >,},{family : "Merienda",load : () =>import("@remotion/google-fonts/Merienda") asPromise <GoogleFont >,},{family : "Merriweather",load : () =>import("@remotion/google-fonts/Merriweather") asPromise <GoogleFont >,},{family : "Merriweather Sans",load : () =>import("@remotion/google-fonts/MerriweatherSans") asPromise <GoogleFont >,},{family : "Montserrat",load : () =>import("@remotion/google-fonts/Montserrat") asPromise <GoogleFont >,},{family : "Montserrat Alternates",load : () =>import("@remotion/google-fonts/MontserratAlternates") asPromise <GoogleFont >,},{family : "Mukta",load : () => import("@remotion/google-fonts/Mukta") asPromise <GoogleFont >,},{family : "Mulish",load : () => import("@remotion/google-fonts/Mulish") asPromise <GoogleFont >,},{family : "Nanum Gothic",load : () =>import("@remotion/google-fonts/NanumGothic") asPromise <GoogleFont >,},{family : "Nanum Gothic Coding",load : () =>import("@remotion/google-fonts/NanumGothicCoding") asPromise <GoogleFont >,},{family : "Nanum Myeongjo",load : () =>import("@remotion/google-fonts/NanumMyeongjo") asPromise <GoogleFont >,},{family : "Neuton",load : () => import("@remotion/google-fonts/Neuton") asPromise <GoogleFont >,},{family : "Noticia Text",load : () =>import("@remotion/google-fonts/NoticiaText") asPromise <GoogleFont >,},{family : "Noto Color Emoji",load : () =>import("@remotion/google-fonts/NotoColorEmoji") asPromise <GoogleFont >,},{family : "Noto Kufi Arabic",load : () =>import("@remotion/google-fonts/NotoKufiArabic") asPromise <GoogleFont >,},{family : "Noto Naskh Arabic",load : () =>import("@remotion/google-fonts/NotoNaskhArabic") asPromise <GoogleFont >,},{family : "Noto Sans",load : () =>import("@remotion/google-fonts/NotoSans") asPromise <GoogleFont >,},{family : "Noto Sans Arabic",load : () =>import("@remotion/google-fonts/NotoSansArabic") asPromise <GoogleFont >,},{family : "Noto Sans Bengali",load : () =>import("@remotion/google-fonts/NotoSansBengali") asPromise <GoogleFont >,},{family : "Noto Sans Display",load : () =>import("@remotion/google-fonts/NotoSansDisplay") asPromise <GoogleFont >,},{family : "Noto Sans HK",load : () =>import("@remotion/google-fonts/NotoSansHK") asPromise <GoogleFont >,},{family : "Noto Sans JP",load : () =>import("@remotion/google-fonts/NotoSansJP") asPromise <GoogleFont >,},{family : "Noto Sans KR",load : () =>import("@remotion/google-fonts/NotoSansKR") asPromise <GoogleFont >,},{family : "Noto Sans Mono",load : () =>import("@remotion/google-fonts/NotoSansMono") asPromise <GoogleFont >,},{family : "Noto Sans SC",load : () =>import("@remotion/google-fonts/NotoSansSC") asPromise <GoogleFont >,},{family : "Noto Sans TC",load : () =>import("@remotion/google-fonts/NotoSansTC") asPromise <GoogleFont >,},{family : "Noto Sans Thai",load : () =>import("@remotion/google-fonts/NotoSansThai") asPromise <GoogleFont >,},{family : "Noto Serif",load : () =>import("@remotion/google-fonts/NotoSerif") asPromise <GoogleFont >,},{family : "Noto Serif JP",load : () =>import("@remotion/google-fonts/NotoSerifJP") asPromise <GoogleFont >,},{family : "Noto Serif KR",load : () =>import("@remotion/google-fonts/NotoSerifKR") asPromise <GoogleFont >,},{family : "Noto Serif TC",load : () =>import("@remotion/google-fonts/NotoSerifTC") asPromise <GoogleFont >,},{family : "Nunito",load : () => import("@remotion/google-fonts/Nunito") asPromise <GoogleFont >,},{family : "Nunito Sans",load : () =>import("@remotion/google-fonts/NunitoSans") asPromise <GoogleFont >,},{family : "Old Standard TT",load : () =>import("@remotion/google-fonts/OldStandardTT") asPromise <GoogleFont >,},{family : "Oleo Script",load : () =>import("@remotion/google-fonts/OleoScript") asPromise <GoogleFont >,},{family : "Open Sans",load : () =>import("@remotion/google-fonts/OpenSans") asPromise <GoogleFont >,},{family : "Orbitron",load : () =>import("@remotion/google-fonts/Orbitron") asPromise <GoogleFont >,},{family : "Oswald",load : () => import("@remotion/google-fonts/Oswald") asPromise <GoogleFont >,},{family : "Outfit",load : () => import("@remotion/google-fonts/Outfit") asPromise <GoogleFont >,},{family : "Overpass",load : () =>import("@remotion/google-fonts/Overpass") asPromise <GoogleFont >,},{family : "Oxygen",load : () => import("@remotion/google-fonts/Oxygen") asPromise <GoogleFont >,},{family : "PT Sans",load : () => import("@remotion/google-fonts/PTSans") asPromise <GoogleFont >,},{family : "PT Sans Caption",load : () =>import("@remotion/google-fonts/PTSansCaption") asPromise <GoogleFont >,},{family : "PT Sans Narrow",load : () =>import("@remotion/google-fonts/PTSansNarrow") asPromise <GoogleFont >,},{family : "PT Serif",load : () => import("@remotion/google-fonts/PTSerif") asPromise <GoogleFont >,},{family : "Pacifico",load : () =>import("@remotion/google-fonts/Pacifico") asPromise <GoogleFont >,},{family : "Passion One",load : () =>import("@remotion/google-fonts/PassionOne") asPromise <GoogleFont >,},{family : "Pathway Gothic One",load : () =>import("@remotion/google-fonts/PathwayGothicOne") asPromise <GoogleFont >,},{family : "Patua One",load : () =>import("@remotion/google-fonts/PatuaOne") asPromise <GoogleFont >,},{family : "Paytone One",load : () =>import("@remotion/google-fonts/PaytoneOne") asPromise <GoogleFont >,},{family : "Permanent Marker",load : () =>import("@remotion/google-fonts/PermanentMarker") asPromise <GoogleFont >,},{family : "Philosopher",load : () =>import("@remotion/google-fonts/Philosopher") asPromise <GoogleFont >,},{family : "Play",load : () => import("@remotion/google-fonts/Play") asPromise <GoogleFont >,},{family : "Playfair Display",load : () =>import("@remotion/google-fonts/PlayfairDisplay") asPromise <GoogleFont >,},{family : "Plus Jakarta Sans",load : () =>import("@remotion/google-fonts/PlusJakartaSans") asPromise <GoogleFont >,},{family : "Poppins",load : () => import("@remotion/google-fonts/Poppins") asPromise <GoogleFont >,},{family : "Prata",load : () => import("@remotion/google-fonts/Prata") asPromise <GoogleFont >,},{family : "Prompt",load : () => import("@remotion/google-fonts/Prompt") asPromise <GoogleFont >,},{family : "Public Sans",load : () =>import("@remotion/google-fonts/PublicSans") asPromise <GoogleFont >,},{family : "Quattrocento",load : () =>import("@remotion/google-fonts/Quattrocento") asPromise <GoogleFont >,},{family : "Quattrocento Sans",load : () =>import("@remotion/google-fonts/QuattrocentoSans") asPromise <GoogleFont >,},{family : "Questrial",load : () =>import("@remotion/google-fonts/Questrial") asPromise <GoogleFont >,},{family : "Quicksand",load : () =>import("@remotion/google-fonts/Quicksand") asPromise <GoogleFont >,},{family : "Rajdhani",load : () =>import("@remotion/google-fonts/Rajdhani") asPromise <GoogleFont >,},{family : "Raleway",load : () => import("@remotion/google-fonts/Raleway") asPromise <GoogleFont >,},{family : "Readex Pro",load : () =>import("@remotion/google-fonts/ReadexPro") asPromise <GoogleFont >,},{family : "Red Hat Display",load : () =>import("@remotion/google-fonts/RedHatDisplay") asPromise <GoogleFont >,},{family : "Righteous",load : () =>import("@remotion/google-fonts/Righteous") asPromise <GoogleFont >,},{family : "Roboto",load : () => import("@remotion/google-fonts/Roboto") asPromise <GoogleFont >,},{family : "Roboto Condensed",load : () =>import("@remotion/google-fonts/RobotoCondensed") asPromise <GoogleFont >,},{family : "Roboto Flex",load : () =>import("@remotion/google-fonts/RobotoFlex") asPromise <GoogleFont >,},{family : "Roboto Mono",load : () =>import("@remotion/google-fonts/RobotoMono") asPromise <GoogleFont >,},{family : "Roboto Serif",load : () =>import("@remotion/google-fonts/RobotoSerif") asPromise <GoogleFont >,},{family : "Roboto Slab",load : () =>import("@remotion/google-fonts/RobotoSlab") asPromise <GoogleFont >,},{family : "Rokkitt",load : () => import("@remotion/google-fonts/Rokkitt") asPromise <GoogleFont >,},{family : "Rowdies",load : () => import("@remotion/google-fonts/Rowdies") asPromise <GoogleFont >,},{family : "Rubik",load : () => import("@remotion/google-fonts/Rubik") asPromise <GoogleFont >,},{family : "Rubik Bubbles",load : () =>import("@remotion/google-fonts/RubikBubbles") asPromise <GoogleFont >,},{family : "Rubik Mono One",load : () =>import("@remotion/google-fonts/RubikMonoOne") asPromise <GoogleFont >,},{family : "Russo One",load : () =>import("@remotion/google-fonts/RussoOne") asPromise <GoogleFont >,},{family : "Sacramento",load : () =>import("@remotion/google-fonts/Sacramento") asPromise <GoogleFont >,},{family : "Saira",load : () => import("@remotion/google-fonts/Saira") asPromise <GoogleFont >,},{family : "Saira Condensed",load : () =>import("@remotion/google-fonts/SairaCondensed") asPromise <GoogleFont >,},{family : "Sarabun",load : () => import("@remotion/google-fonts/Sarabun") asPromise <GoogleFont >,},{family : "Satisfy",load : () => import("@remotion/google-fonts/Satisfy") asPromise <GoogleFont >,},{family : "Sawarabi Gothic",load : () =>import("@remotion/google-fonts/SawarabiGothic") asPromise <GoogleFont >,},{family : "Sawarabi Mincho",load : () =>import("@remotion/google-fonts/SawarabiMincho") asPromise <GoogleFont >,},{family : "Sen",load : () => import("@remotion/google-fonts/Sen") asPromise <GoogleFont >,},{family : "Shadows Into Light",load : () =>import("@remotion/google-fonts/ShadowsIntoLight") asPromise <GoogleFont >,},{family : "Signika",load : () => import("@remotion/google-fonts/Signika") asPromise <GoogleFont >,},{family : "Signika Negative",load : () =>import("@remotion/google-fonts/SignikaNegative") asPromise <GoogleFont >,},{family : "Silkscreen",load : () =>import("@remotion/google-fonts/Silkscreen") asPromise <GoogleFont >,},{family : "Six Caps",load : () => import("@remotion/google-fonts/SixCaps") asPromise <GoogleFont >,},{family : "Slabo 27px",load : () =>import("@remotion/google-fonts/Slabo27px") asPromise <GoogleFont >,},{family : "Sora",load : () => import("@remotion/google-fonts/Sora") asPromise <GoogleFont >,},{family : "Source Code Pro",load : () =>import("@remotion/google-fonts/SourceCodePro") asPromise <GoogleFont >,},{family : "Source Sans 3",load : () =>import("@remotion/google-fonts/SourceSans3") asPromise <GoogleFont >,},{family : "Source Serif 4",load : () =>import("@remotion/google-fonts/SourceSerif4") asPromise <GoogleFont >,},{family : "Space Grotesk",load : () =>import("@remotion/google-fonts/SpaceGrotesk") asPromise <GoogleFont >,},{family : "Space Mono",load : () =>import("@remotion/google-fonts/SpaceMono") asPromise <GoogleFont >,},{family : "Special Elite",load : () =>import("@remotion/google-fonts/SpecialElite") asPromise <GoogleFont >,},{family : "Spectral",load : () =>import("@remotion/google-fonts/Spectral") asPromise <GoogleFont >,},{family : "Tajawal",load : () => import("@remotion/google-fonts/Tajawal") asPromise <GoogleFont >,},{family : "Tangerine",load : () =>import("@remotion/google-fonts/Tangerine") asPromise <GoogleFont >,},{family : "Teko",load : () => import("@remotion/google-fonts/Teko") asPromise <GoogleFont >,},{family : "Tinos",load : () => import("@remotion/google-fonts/Tinos") asPromise <GoogleFont >,},{family : "Titan One",load : () =>import("@remotion/google-fonts/TitanOne") asPromise <GoogleFont >,},{family : "Titillium Web",load : () =>import("@remotion/google-fonts/TitilliumWeb") asPromise <GoogleFont >,},{family : "Ubuntu",load : () => import("@remotion/google-fonts/Ubuntu") asPromise <GoogleFont >,},{family : "Ubuntu Condensed",load : () =>import("@remotion/google-fonts/UbuntuCondensed") asPromise <GoogleFont >,},{family : "Ubuntu Mono",load : () =>import("@remotion/google-fonts/UbuntuMono") asPromise <GoogleFont >,},{family : "Unbounded",load : () =>import("@remotion/google-fonts/Unbounded") asPromise <GoogleFont >,},{family : "Unna",load : () => import("@remotion/google-fonts/Unna") asPromise <GoogleFont >,},{family : "Urbanist",load : () =>import("@remotion/google-fonts/Urbanist") asPromise <GoogleFont >,},{family : "Varela Round",load : () =>import("@remotion/google-fonts/VarelaRound") asPromise <GoogleFont >,},{family : "Vollkorn",load : () =>import("@remotion/google-fonts/Vollkorn") asPromise <GoogleFont >,},{family : "Work Sans",load : () =>import("@remotion/google-fonts/WorkSans") asPromise <GoogleFont >,},{family : "Yanone Kaffeesatz",load : () =>import("@remotion/google-fonts/YanoneKaffeesatz") asPromise <GoogleFont >,},{family : "Yantramanav",load : () =>import("@remotion/google-fonts/Yantramanav") asPromise <GoogleFont >,},{family : "Yellowtail",load : () =>import("@remotion/google-fonts/Yellowtail") asPromise <GoogleFont >,},{family : "Yeseva One",load : () =>import("@remotion/google-fonts/YesevaOne") asPromise <GoogleFont >,},{family : "Zen Kaku Gothic New",load : () =>import("@remotion/google-fonts/ZenKakuGothicNew") asPromise <GoogleFont >,},{family : "Zeyada",load : () => import("@remotion/google-fonts/Zeyada") asPromise <GoogleFont >,},{family : "Zilla Slab",load : () =>import("@remotion/google-fonts/ZillaSlab") asPromise <GoogleFont >,},];
Show only the 100 most popular Google Fonts
To reduce bundle size, you can limit the selection. Instead of calling getAvailableFonts()
, create a file with the following contents and use it as the fonts array:
ts
import type {GoogleFont } from "@remotion/google-fonts";export consttop100 = [{family : "Abel",load : () => import("@remotion/google-fonts/Abel") asPromise <GoogleFont >,},{family : "Anton",load : () => import("@remotion/google-fonts/Anton") asPromise <GoogleFont >,},{family : "Archivo",load : () => import("@remotion/google-fonts/Archivo") asPromise <GoogleFont >,},{family : "Arimo",load : () => import("@remotion/google-fonts/Arimo") asPromise <GoogleFont >,},{family : "Arvo",load : () => import("@remotion/google-fonts/Arvo") asPromise <GoogleFont >,},{family : "Asap",load : () => import("@remotion/google-fonts/Asap") asPromise <GoogleFont >,},{family : "Assistant",load : () =>import("@remotion/google-fonts/Assistant") asPromise <GoogleFont >,},{family : "Barlow",load : () => import("@remotion/google-fonts/Barlow") asPromise <GoogleFont >,},{family : "Barlow Condensed",load : () =>import("@remotion/google-fonts/BarlowCondensed") asPromise <GoogleFont >,},{family : "Barlow Semi Condensed",load : () =>import("@remotion/google-fonts/BarlowSemiCondensed") asPromise <GoogleFont >,},{family : "Bebas Neue",load : () =>import("@remotion/google-fonts/BebasNeue") asPromise <GoogleFont >,},{family : "Bitter",load : () => import("@remotion/google-fonts/Bitter") asPromise <GoogleFont >,},{family : "Cabin",load : () => import("@remotion/google-fonts/Cabin") asPromise <GoogleFont >,},{family : "Cairo",load : () => import("@remotion/google-fonts/Cairo") asPromise <GoogleFont >,},{family : "Caveat",load : () => import("@remotion/google-fonts/Caveat") asPromise <GoogleFont >,},{family : "Chakra Petch",load : () =>import("@remotion/google-fonts/ChakraPetch") asPromise <GoogleFont >,},{family : "Comfortaa",load : () =>import("@remotion/google-fonts/Comfortaa") asPromise <GoogleFont >,},{family : "Cormorant Garamond",load : () =>import("@remotion/google-fonts/CormorantGaramond") asPromise <GoogleFont >,},{family : "Crimson Text",load : () =>import("@remotion/google-fonts/CrimsonText") asPromise <GoogleFont >,},{family : "DM Sans",load : () => import("@remotion/google-fonts/DMSans") asPromise <GoogleFont >,},{family : "Dancing Script",load : () =>import("@remotion/google-fonts/DancingScript") asPromise <GoogleFont >,},{family : "Dosis",load : () => import("@remotion/google-fonts/Dosis") asPromise <GoogleFont >,},{family : "EB Garamond",load : () =>import("@remotion/google-fonts/EBGaramond") asPromise <GoogleFont >,},{family : "Exo 2",load : () => import("@remotion/google-fonts/Exo2") asPromise <GoogleFont >,},{family : "Figtree",load : () => import("@remotion/google-fonts/Figtree") asPromise <GoogleFont >,},{family : "Fira Sans",load : () =>import("@remotion/google-fonts/FiraSans") asPromise <GoogleFont >,},{family : "Fira Sans Condensed",load : () =>import("@remotion/google-fonts/FiraSansCondensed") asPromise <GoogleFont >,},{family : "Fjalla One",load : () =>import("@remotion/google-fonts/FjallaOne") asPromise <GoogleFont >,},{family : "Heebo",load : () => import("@remotion/google-fonts/Heebo") asPromise <GoogleFont >,},{family : "Hind",load : () => import("@remotion/google-fonts/Hind") asPromise <GoogleFont >,},{family : "Hind Siliguri",load : () =>import("@remotion/google-fonts/HindSiliguri") asPromise <GoogleFont >,},{family : "IBM Plex Mono",load : () =>import("@remotion/google-fonts/IBMPlexMono") asPromise <GoogleFont >,},{family : "IBM Plex Sans",load : () =>import("@remotion/google-fonts/IBMPlexSans") asPromise <GoogleFont >,},{family : "Inconsolata",load : () =>import("@remotion/google-fonts/Inconsolata") asPromise <GoogleFont >,},{family : "Inter",load : () => import("@remotion/google-fonts/Inter") asPromise <GoogleFont >,},{family : "Josefin Sans",load : () =>import("@remotion/google-fonts/JosefinSans") asPromise <GoogleFont >,},{family : "Jost",load : () => import("@remotion/google-fonts/Jost") asPromise <GoogleFont >,},{family : "Kanit",load : () => import("@remotion/google-fonts/Kanit") asPromise <GoogleFont >,},{family : "Karla",load : () => import("@remotion/google-fonts/Karla") asPromise <GoogleFont >,},{family : "Lato",load : () => import("@remotion/google-fonts/Lato") asPromise <GoogleFont >,},{family : "Lexend",load : () => import("@remotion/google-fonts/Lexend") asPromise <GoogleFont >,},{family : "Libre Baskerville",load : () =>import("@remotion/google-fonts/LibreBaskerville") asPromise <GoogleFont >,},{family : "Libre Franklin",load : () =>import("@remotion/google-fonts/LibreFranklin") asPromise <GoogleFont >,},{family : "Lobster",load : () => import("@remotion/google-fonts/Lobster") asPromise <GoogleFont >,},{family : "Lora",load : () => import("@remotion/google-fonts/Lora") asPromise <GoogleFont >,},{family : "M PLUS Rounded 1c",load : () =>import("@remotion/google-fonts/MPLUSRounded1c") asPromise <GoogleFont >,},{family : "Manrope",load : () => import("@remotion/google-fonts/Manrope") asPromise <GoogleFont >,},{family : "Maven Pro",load : () =>import("@remotion/google-fonts/MavenPro") asPromise <GoogleFont >,},{family : "Merriweather",load : () =>import("@remotion/google-fonts/Merriweather") asPromise <GoogleFont >,},{family : "Montserrat",load : () =>import("@remotion/google-fonts/Montserrat") asPromise <GoogleFont >,},{family : "Mukta",load : () => import("@remotion/google-fonts/Mukta") asPromise <GoogleFont >,},{family : "Mulish",load : () => import("@remotion/google-fonts/Mulish") asPromise <GoogleFont >,},{family : "Nanum Gothic",load : () =>import("@remotion/google-fonts/NanumGothic") asPromise <GoogleFont >,},{family : "Noto Color Emoji",load : () =>import("@remotion/google-fonts/NotoColorEmoji") asPromise <GoogleFont >,},{family : "Noto Sans",load : () =>import("@remotion/google-fonts/NotoSans") asPromise <GoogleFont >,},{family : "Noto Sans Arabic",load : () =>import("@remotion/google-fonts/NotoSansArabic") asPromise <GoogleFont >,},{family : "Noto Sans HK",load : () =>import("@remotion/google-fonts/NotoSansHK") asPromise <GoogleFont >,},{family : "Noto Sans JP",load : () =>import("@remotion/google-fonts/NotoSansJP") asPromise <GoogleFont >,},{family : "Noto Sans KR",load : () =>import("@remotion/google-fonts/NotoSansKR") asPromise <GoogleFont >,},{family : "Noto Sans SC",load : () =>import("@remotion/google-fonts/NotoSansSC") asPromise <GoogleFont >,},{family : "Noto Sans TC",load : () =>import("@remotion/google-fonts/NotoSansTC") asPromise <GoogleFont >,},{family : "Noto Serif",load : () =>import("@remotion/google-fonts/NotoSerif") asPromise <GoogleFont >,},{family : "Noto Serif JP",load : () =>import("@remotion/google-fonts/NotoSerifJP") asPromise <GoogleFont >,},{family : "Nunito",load : () => import("@remotion/google-fonts/Nunito") asPromise <GoogleFont >,},{family : "Nunito Sans",load : () =>import("@remotion/google-fonts/NunitoSans") asPromise <GoogleFont >,},{family : "Open Sans",load : () =>import("@remotion/google-fonts/OpenSans") asPromise <GoogleFont >,},{family : "Oswald",load : () => import("@remotion/google-fonts/Oswald") asPromise <GoogleFont >,},{family : "Outfit",load : () => import("@remotion/google-fonts/Outfit") asPromise <GoogleFont >,},{family : "Overpass",load : () =>import("@remotion/google-fonts/Overpass") asPromise <GoogleFont >,},{family : "Oxygen",load : () => import("@remotion/google-fonts/Oxygen") asPromise <GoogleFont >,},{family : "PT Sans",load : () => import("@remotion/google-fonts/PTSans") asPromise <GoogleFont >,},{family : "PT Sans Narrow",load : () =>import("@remotion/google-fonts/PTSansNarrow") asPromise <GoogleFont >,},{family : "PT Serif",load : () => import("@remotion/google-fonts/PTSerif") asPromise <GoogleFont >,},{family : "Pacifico",load : () =>import("@remotion/google-fonts/Pacifico") asPromise <GoogleFont >,},{family : "Play",load : () => import("@remotion/google-fonts/Play") asPromise <GoogleFont >,},{family : "Playfair Display",load : () =>import("@remotion/google-fonts/PlayfairDisplay") asPromise <GoogleFont >,},{family : "Poppins",load : () => import("@remotion/google-fonts/Poppins") asPromise <GoogleFont >,},{family : "Prompt",load : () => import("@remotion/google-fonts/Prompt") asPromise <GoogleFont >,},{family : "Public Sans",load : () =>import("@remotion/google-fonts/PublicSans") asPromise <GoogleFont >,},{family : "Quicksand",load : () =>import("@remotion/google-fonts/Quicksand") asPromise <GoogleFont >,},{family : "Rajdhani",load : () =>import("@remotion/google-fonts/Rajdhani") asPromise <GoogleFont >,},{family : "Raleway",load : () => import("@remotion/google-fonts/Raleway") asPromise <GoogleFont >,},{family : "Red Hat Display",load : () =>import("@remotion/google-fonts/RedHatDisplay") asPromise <GoogleFont >,},{family : "Roboto",load : () => import("@remotion/google-fonts/Roboto") asPromise <GoogleFont >,},{family : "Roboto Condensed",load : () =>import("@remotion/google-fonts/RobotoCondensed") asPromise <GoogleFont >,},{family : "Roboto Mono",load : () =>import("@remotion/google-fonts/RobotoMono") asPromise <GoogleFont >,},{family : "Roboto Slab",load : () =>import("@remotion/google-fonts/RobotoSlab") asPromise <GoogleFont >,},{family : "Rubik",load : () => import("@remotion/google-fonts/Rubik") asPromise <GoogleFont >,},{family : "Shadows Into Light",load : () =>import("@remotion/google-fonts/ShadowsIntoLight") asPromise <GoogleFont >,},{family : "Signika Negative",load : () =>import("@remotion/google-fonts/SignikaNegative") asPromise <GoogleFont >,},{family : "Slabo 27px",load : () =>import("@remotion/google-fonts/Slabo27px") asPromise <GoogleFont >,},{family : "Source Code Pro",load : () =>import("@remotion/google-fonts/SourceCodePro") asPromise <GoogleFont >,},{family : "Source Sans 3",load : () =>import("@remotion/google-fonts/SourceSans3") asPromise <GoogleFont >,},{family : "Space Grotesk",load : () =>import("@remotion/google-fonts/SpaceGrotesk") asPromise <GoogleFont >,},{family : "Teko",load : () => import("@remotion/google-fonts/Teko") asPromise <GoogleFont >,},{family : "Titillium Web",load : () =>import("@remotion/google-fonts/TitilliumWeb") asPromise <GoogleFont >,},{family : "Ubuntu",load : () => import("@remotion/google-fonts/Ubuntu") asPromise <GoogleFont >,},{family : "Varela Round",load : () =>import("@remotion/google-fonts/VarelaRound") asPromise <GoogleFont >,},{family : "Work Sans",load : () =>import("@remotion/google-fonts/WorkSans") asPromise <GoogleFont >,},{family : "Zilla Slab",load : () =>import("@remotion/google-fonts/ZillaSlab") asPromise <GoogleFont >,},];
Show only the 25 most popular Google Fonts
To reduce bundle size, you can limit the selection. Instead of calling getAvailableFonts()
, create a file with the following contents and use it as the fonts array:
ts
import type {GoogleFont } from "@remotion/google-fonts";export consttop25 = [{family : "Inter",load : () => import("@remotion/google-fonts/Inter") asPromise <GoogleFont >,},{family : "Kanit",load : () => import("@remotion/google-fonts/Kanit") asPromise <GoogleFont >,},{family : "Lato",load : () => import("@remotion/google-fonts/Lato") asPromise <GoogleFont >,},{family : "Lora",load : () => import("@remotion/google-fonts/Lora") asPromise <GoogleFont >,},{family : "Merriweather",load : () =>import("@remotion/google-fonts/Merriweather") asPromise <GoogleFont >,},{family : "Montserrat",load : () =>import("@remotion/google-fonts/Montserrat") asPromise <GoogleFont >,},{family : "Noto Sans",load : () =>import("@remotion/google-fonts/NotoSans") asPromise <GoogleFont >,},{family : "Noto Sans JP",load : () =>import("@remotion/google-fonts/NotoSansJP") asPromise <GoogleFont >,},{family : "Noto Sans KR",load : () =>import("@remotion/google-fonts/NotoSansKR") asPromise <GoogleFont >,},{family : "Noto Sans TC",load : () =>import("@remotion/google-fonts/NotoSansTC") asPromise <GoogleFont >,},{family : "Nunito",load : () => import("@remotion/google-fonts/Nunito") asPromise <GoogleFont >,},{family : "Nunito Sans",load : () =>import("@remotion/google-fonts/NunitoSans") asPromise <GoogleFont >,},{family : "Open Sans",load : () =>import("@remotion/google-fonts/OpenSans") asPromise <GoogleFont >,},{family : "Oswald",load : () => import("@remotion/google-fonts/Oswald") asPromise <GoogleFont >,},{family : "PT Sans",load : () => import("@remotion/google-fonts/PTSans") asPromise <GoogleFont >,},{family : "Playfair Display",load : () =>import("@remotion/google-fonts/PlayfairDisplay") asPromise <GoogleFont >,},{family : "Poppins",load : () => import("@remotion/google-fonts/Poppins") asPromise <GoogleFont >,},{family : "Raleway",load : () => import("@remotion/google-fonts/Raleway") asPromise <GoogleFont >,},{family : "Roboto",load : () => import("@remotion/google-fonts/Roboto") asPromise <GoogleFont >,},{family : "Roboto Condensed",load : () =>import("@remotion/google-fonts/RobotoCondensed") asPromise <GoogleFont >,},{family : "Roboto Mono",load : () =>import("@remotion/google-fonts/RobotoMono") asPromise <GoogleFont >,},{family : "Roboto Slab",load : () =>import("@remotion/google-fonts/RobotoSlab") asPromise <GoogleFont >,},{family : "Rubik",load : () => import("@remotion/google-fonts/Rubik") asPromise <GoogleFont >,},{family : "Ubuntu",load : () => import("@remotion/google-fonts/Ubuntu") asPromise <GoogleFont >,},{family : "Work Sans",load : () =>import("@remotion/google-fonts/WorkSans") asPromise <GoogleFont >,},];