Skip to content

Commit 351a874

Browse files
authored
Merge pull request #12501 from ethereum/static-inter-font
Performance: use inter static fonts
2 parents e4cf8cc + 2076622 commit 351a874

File tree

12 files changed

+154
-10
lines changed

12 files changed

+154
-10
lines changed

public/fonts/inter/cyrillic-ext.woff2

26.6 KB
Binary file not shown.

public/fonts/inter/cyrillic.woff2

17.2 KB
Binary file not shown.

public/fonts/inter/greek-ext.woff2

12.4 KB
Binary file not shown.

public/fonts/inter/greek.woff2

22 KB
Binary file not shown.

public/fonts/inter/latin-ext.woff2

78.1 KB
Binary file not shown.

public/fonts/inter/latin.woff2

45.6 KB
Binary file not shown.

public/fonts/inter/vietnamese.woff2

10.3 KB
Binary file not shown.
-786 KB
Binary file not shown.

src/lib/fonts.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
import localFont from "next/font/local"
22

3-
// downloaded from https://fonts.google.com/specimen/Inter
4-
export const inter = localFont({
5-
src: "../fonts/Inter-VariableFont_slnt,wght.ttf",
6-
display: "swap",
7-
fallback: ["sans-serif"],
8-
preload: true,
9-
})
10-
113
// downloaded from https://fonts.google.com/specimen/IBM+Plex+Mono
124
export const mono = localFont({
135
src: "../fonts/IBMPlexMono-Regular.ttf",

src/pages/_app.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,11 @@ import customTheme from "@/@chakra-ui/theme"
1010

1111
import { AppPropsWithLayout } from "@/lib/types"
1212

13+
import "../styles/global.css"
14+
1315
import { useLocaleDirection } from "@/hooks/useLocaleDirection"
1416
import { RootLayout } from "@/layouts/RootLayout"
15-
import { inter, mono } from "@/lib/fonts"
17+
import { mono } from "@/lib/fonts"
1618

1719
const App = ({ Component, pageProps }: AppPropsWithLayout) => {
1820
useEffect(() => {
@@ -37,7 +39,7 @@ const App = ({ Component, pageProps }: AppPropsWithLayout) => {
3739
<style jsx global>
3840
{`
3941
:root {
40-
--font-inter: ${inter.style.fontFamily};
42+
--font-inter: Inter, sans-serif;
4143
--font-mono: ${mono.style.fontFamily};
4244
}
4345
`}

0 commit comments

Comments
 (0)