Created
July 21, 2023 18:48
-
-
Save alfawal/5329f1a884653401203730baf6bac307 to your computer and use it in GitHub Desktop.
Custom font fallbacks are not allowed with next/font/google
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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