Last active
January 10, 2026 08:32
-
-
Save jorgeadev/0a79d62356eca94e43f668bc5a018899 to your computer and use it in GitHub Desktop.
Example using custom fonts
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 type { Metadata } from "next"; | |
| import localFont from "next/font/local"; | |
| import "../styles/globals.css"; | |
| import { ReactNode } from "react"; | |
| const excalifont = localFont({ | |
| src: "./fonts/excalifont-regular.woff", | |
| variable: "--font-excalifont", | |
| weight: "100 200 300 400 500 600 700 800 900 normal regular bold light italic", | |
| }); | |
| export const metadata: Metadata = { | |
| title: "Create Next App", | |
| description: "Generated by create next app", | |
| }; | |
| export default function RootLayout({ | |
| children, | |
| }: Readonly<{ | |
| children: ReactNode; | |
| }>) { | |
| return ( | |
| <html lang="en" className="dark"> | |
| <body className={ `${ excalifont.variable } antialiased font-[family-name:var(--font-excalifont)]` }> | |
| { children } | |
| </body> | |
| </html> | |
| ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment