Next.js Discord

Discord Forum

What's the standard way of importing Fonts?

Answered
Dwarf Crocodile posted this in #help-forum
Open in Discord
Dwarf CrocodileOP
I want to use 2 fonts.

My root layout.tsx is:

import type { Metadata } from "next";
import { Dela_Gothic_One, Martian_Mono } from "next/font/google";
import "./globals.css";
import Footer from "../components/Footer";

const delaGothic = Dela_Gothic_One({
  weight: "400",
  subsets: ["latin"],
});
const martianMono = Martian_Mono({
  weight: "300",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "",
  description: "",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${delaGothic.className} ${martianMono.className} antialiased`}
      >
        {children}
        <Footer />
      </body>
    </html>
  );
}


I have initialized the next app woth tailwind. But I dont see any `tailwind.config.ts` file

2 Replies