Skip to content

Commit b327dc2

Browse files
Fix font build error
1 parent 0cb22cf commit b327dc2

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed
Binary file not shown.
Binary file not shown.

src/app/layout.tsx

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
11
import '@/styles/globals.css';
22
import Script from 'next/script';
33
import type { Metadata, Viewport } from 'next';
4-
import { Atkinson_Hyperlegible_Mono } from 'next/font/google';
54
import { unstable_ViewTransition as ViewTransition } from 'react';
65
import { Toaster } from 'react-hot-toast';
76
import { SessionProvider } from 'next-auth/react';
87
import { Footer } from '@/components/footer';
98
import { ReportModal } from '@/components/report-modal';
109
import { env } from '@/env.mjs';
10+
import localFont from 'next/font/local';
1111

12-
const atkinsonHyperlegibleMono = Atkinson_Hyperlegible_Mono({
13-
subsets: ['latin'],
14-
weight: ['400', '500'],
15-
display: 'swap',
16-
variable: '--font-space-grotesk'
12+
const atkinsonHyperlegibleMono = localFont({
13+
variable: '--font-atkinson-hyperlegible-mono',
14+
src: [
15+
{
16+
path: './fonts/AtkinsonHyperlegibleMono-Italic-VariableFont_wght.ttf',
17+
weight: '400',
18+
style: 'italic'
19+
},
20+
{
21+
path: './fonts/AtkinsonHyperlegibleMono-VariableFont_wght.ttf',
22+
weight: '400',
23+
style: 'normal'
24+
}
25+
]
1726
});
1827

1928
export default function RootLayout({ children }: React.PropsWithChildren) {
2029
return (
2130
<html className={atkinsonHyperlegibleMono.variable}>
22-
<body className="font-sans font-normal bg-hacktoberfest-blue">
31+
<body className="font-mono font-normal bg-hacktoberfest-blue">
2332
<ViewTransition>
2433
{children}
2534
<Footer />

tailwind.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const config = {
99
theme: {
1010
extend: {
1111
fontFamily: {
12-
sans: ['var(--font-space-grotesk)', 'ui-sans-serif', 'system-ui']
12+
mono: ['var(--font-atkinson-hyperlegible-mono)', 'monospace']
1313
},
1414
backgroundImage: {
1515
'primary-btn-hover-gradient':

0 commit comments

Comments
 (0)