Skip to content

Instantly share code, notes, and snippets.

@jorgeadev
Last active January 10, 2026 08:32
Show Gist options
  • Select an option

  • Save jorgeadev/0a79d62356eca94e43f668bc5a018899 to your computer and use it in GitHub Desktop.

Select an option

Save jorgeadev/0a79d62356eca94e43f668bc5a018899 to your computer and use it in GitHub Desktop.
Example using custom fonts
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