Skip to content

Commit 8094312

Browse files
committed
add font files to fetch them locally at build time
1 parent 9f6c4d4 commit 8094312

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

src/fonts/IBMPlexMono-Regular.ttf

131 KB
Binary file not shown.

src/fonts/InterVariable.woff2

337 KB
Binary file not shown.

src/lib/fonts.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
import { Inter } from "next/font/google"
2-
import { IBM_Plex_Mono } from "next/font/google"
1+
import localFont from "next/font/local"
32

4-
export const inter = Inter({
5-
subsets: ["latin"],
3+
// downloaded from https://github.com/rsms/inter/
4+
export const inter = localFont({
5+
src: "../fonts/InterVariable.woff2",
6+
display: "swap",
67
fallback: ["sans-serif"],
78
})
89

9-
export const mono = IBM_Plex_Mono({
10-
subsets: ["latin"],
11-
weight: ["400"],
10+
// downloaded from https://fonts.google.com/specimen/IBM+Plex+Mono
11+
export const mono = localFont({
12+
src: "../fonts/IBMPlexMono-Regular.ttf",
13+
display: "swap",
14+
weight: "400",
1215
fallback: ["Courier", "monospace"],
1316
})

0 commit comments

Comments
 (0)