Skip to content

Instantly share code, notes, and snippets.

@alfawal
Created July 21, 2023 18:48
Show Gist options
  • Save alfawal/5329f1a884653401203730baf6bac307 to your computer and use it in GitHub Desktop.
Save alfawal/5329f1a884653401203730baf6bac307 to your computer and use it in GitHub Desktop.
Custom font fallbacks are not allowed with next/font/google
import { Inter, Noto_Sans_Arabic } from "next/font/google";
const inter = Inter({
subsets: ["latin"],
});
const noto = Noto_Sans_Arabic({
subsets: ["arabic"],
});
export default async function Layout({ children }) {
return (
<html>
<style>
{`
html {
font-family: ${noto.style.fontFamily}, ${
inter.style.fontFamily
};
}
`}
</style>
<body>
{children}
</body>
</html>
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment