apply pretnedard font

This commit is contained in:
koreacomp5
2025-11-16 17:44:47 +09:00
parent 2d7b06eb9d
commit 87c3b1523e
3 changed files with 13 additions and 4 deletions

Binary file not shown.

8
src/app/fonts.ts Normal file
View File

@@ -0,0 +1,8 @@
import localFont from "next/font/local";
export const pretendard = localFont({
src: "../../public/fonts/pretendard/PretendardVariable.woff2",
weight: "45 920", // variable 폰트 범위
variable: "--font-pretendard", // CSS 변수 이름
display: "swap",
});

View File

@@ -1,5 +1,6 @@
import type { Metadata } from "next"; import type { Metadata } from "next";
import "./globals.css"; import "./globals.css";
import { pretendard } from "./fonts";
export const metadata: Metadata = { export const metadata: Metadata = {
title: "XRLMS", title: "XRLMS",
@@ -8,13 +9,13 @@ export const metadata: Metadata = {
export default function RootLayout({ export default function RootLayout({
children, children,
}: Readonly<{ }: Readonly<{ children: React.ReactNode; }>) {
children: React.ReactNode;
}>) {
return ( return (
<html lang="en"> <html lang="en">
<body> <body className={pretendard.className}>
text-pretendard
{children} {children}
TEXT
</body> </body>
</html> </html>
); );