Skip to content

Commit 0b7f8ad

Browse files
committed
chore: add inter font
1 parent 83f5cec commit 0b7f8ad

File tree

5 files changed

+39
-1
lines changed

5 files changed

+39
-1
lines changed

public/fonts/inter-var-latin.woff2

35.7 KB
Binary file not shown.

src/pages/_document.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,15 @@ class MyDocument extends Document {
1010
render() {
1111
return (
1212
<Html lang="en">
13-
<Head />
13+
<Head>
14+
<link
15+
rel="preload"
16+
href="/fonts/inter-var-latin.woff2"
17+
as="font"
18+
type="font/woff2"
19+
crossOrigin="anonymous"
20+
/>
21+
</Head>
1422
<body>
1523
<Main />
1624
<NextScript />

src/styles/globals.css

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
@font-face {
2+
font-family: 'Inter';
3+
font-style: normal;
4+
font-weight: 100 900;
5+
font-display: optional;
6+
src: url(/fonts/inter-var-latin.woff2) format('woff2');
7+
unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
8+
U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215,
9+
U+FEFF, U+FFFD;
10+
}

tailwind.config.js

+5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
const { fontFamily } = require('tailwindcss/defaultTheme')
2+
13
module.exports = {
24
mode: 'jit',
35
purge: ['./src/**/*.{js,ts,jsx,tsx}'],
46
darkMode: false, // or 'media' or 'class'
57
theme: {
8+
fontFamily: {
9+
sans: ['Inter', ...fontFamily.sans],
10+
},
611
extend: {},
712
},
813
variants: {

vercel.json

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"cleanUrls": true,
3+
"trailingSlash": false,
4+
"headers": [
5+
{
6+
"source": "/fonts/inter-var-latin.woff2",
7+
"headers": [
8+
{
9+
"key": "Cache-Control",
10+
"value": "public, max-age=31536000, immutable"
11+
}
12+
]
13+
}
14+
]
15+
}

0 commit comments

Comments
 (0)