Next.js Discord

Discord Forum

Using Custom Fonts Shadcn

Unanswered
WhyFencePost (Ping Reply) posted this in #help-forum
Open in Discord
can someone help me figure out how to switch to a google font with Shadcn?
i tried to swap out the body section in the global.css and it did not work, instead the text is in times new Roman. can someone please help me?
@import url('https://fonts.googleapis.com/css2?family=Baloo+Bhaina+2:wght@400..800&display=swap');

body {
  font-family: "Baloo Bhaina 2", serif;
}

3 Replies

Giant Angora
@WhyFencePost (Ping Reply) you need to set font with next/font/google
import {Baloo_Bhai_2} from 'next/fonts/google';

const font = Baloo_Bhai_2({ subsets: ['latin'], weight: ['400'] });
Thank u