Open IounOm opened 2 days ago
ประกาศใช้ font โดยใช้ mui theme
/app/layout.tsx
const geistSans = localFont({ src: "./fonts/GeistVF.woff", variable: "--font-geist-sans", weight: "100 900", }); const geistMono = localFont({ src: "./fonts/GeistMonoVF.woff", variable: "--font-geist-mono", weight: "100 900", }); const playfairDisplay = Playfair_Display({ weight: ["400", "600", "700"], subsets: ["latin"], variable: "--font-playfair-display", }); const manrope = Manrope({ weight: ["200", "400", "500", "600", "700"], subsets: ["latin"], variable: "--font-manrope", }); const lato = Lato({ weight: ["100", "300", "400", "700", "900"], subsets: ["latin"], variable: "--font-lato", }); const poppins = Poppins({ weight: ["100", "300", "400", "700", "900"], subsets: ["latin"], variable: "--font-poppins", });
แก้ไขแล้วครับได้เปลี่ยนเป็นการใช้
const theme = createTheme({ typography: { fontFamily: <fontname>.style.fontFamily, }, });
ประกาศใช้ font โดยใช้ mui theme
/app/layout.tsx