Created
January 13, 2024 17:50
-
-
Save Sardonyx001/560947f0dfb920b62486c0a12a9e1875 to your computer and use it in GitHub Desktop.
Use LINE Seed font in Nextjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import localFont from 'next/font/local' | |
// path -> "src/app/" | |
const lineSeedSans = localFont({ | |
src: [ | |
{ | |
path: './LINESeedSans_W_Bd.woff2', | |
weight: '700', | |
style: 'bold', | |
}, | |
{ | |
path: './LINESeedSans_W_He.woff2', | |
weight: '900', | |
style: 'heavy', | |
}, | |
{ | |
path: './LINESeedSans_W_Rg.woff2', | |
weight: '400', | |
style: 'normal', | |
}, | |
{ | |
path: './LINESeedSans_W_Th.woff2', | |
weight: '300', | |
style: 'thin', | |
}, | |
{ | |
path: './LINESeedSans_W_XBd.woff2', | |
weight: '800', | |
style: 'bolder', | |
}, | |
], | |
}) | |
export const metadata: Metadata = { | |
title: 'Create Next App', | |
description: 'Generated by create next app', | |
} | |
export default function RootLayout({ | |
children, | |
}: { | |
children: React.ReactNode | |
}) { | |
return ( | |
<html lang="en"> | |
<body className={lineSeedSans.className}>{children}</body> | |
</html> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment