Skip to content

Commit ffafa66

Browse files
feat: add IBM Plex Mono font
1 parent 26245f6 commit ffafa66

File tree

6 files changed

+27
-3
lines changed

6 files changed

+27
-3
lines changed

.storybook/preview.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { action } from "@storybook/addon-actions"
33
import theme from "../src/@chakra-ui/gatsby-plugin/theme"
44

55
import "../static/fonts/inter-font-face.css"
6+
import "../static/fonts/ibm-plex-font-face.css"
67

78
const chakraBreakpointArray = Object.entries(theme.breakpoints)
89

gatsby-ssr.tsx

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,23 @@ export const onRenderBody = ({ setHeadComponents }: RenderBodyArgs) => {
1212
setHeadComponents([
1313
<link
1414
rel="preload"
15-
href="/fonts/Inter-Regular.woff2?v=3.19"
15+
href="/fonts/Inter-Regular.woff2"
16+
as="font"
17+
type="font/woff2"
18+
crossOrigin="anonymous"
19+
key="interFont"
20+
/>,
21+
<link
22+
rel="preload"
23+
href="/fonts/Inter-Regular.woff"
24+
as="font"
25+
type="font/woff"
26+
crossOrigin="anonymous"
27+
key="interFont"
28+
/>,
29+
<link
30+
rel="preload"
31+
href="/fonts/IBMPlexMono-Regular.woff2"
1632
as="font"
1733
type="font/woff2"
1834
crossOrigin="anonymous"

src/@chakra-ui/gatsby-plugin/foundations/typography.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ const typography = {
22
fonts: {
33
heading: "Inter, sans-serif",
44
body: "Inter, sans-serif",
5-
monospace:
6-
"SFMono-Regular, Consolas, 'Roboto Mono', 'Droid Sans Mono', 'Liberation Mono', Menlo, Courier, monospace",
5+
monospace: "'IBM Plex Mono', Courier, monospace",
76
},
87

98
lineHeights: {

src/components/Layout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import type { Context } from "../types"
3030
import client from "../apollo"
3131

3232
import "../../static/fonts/inter-font-face.css"
33+
import "../../static/fonts/ibm-plex-font-face.css"
3334

3435
export interface IProps {
3536
children?: React.ReactNode
38.4 KB
Binary file not shown.

static/fonts/ibm-plex-font-face.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@font-face {
2+
font-family: "IBM Plex Mono";
3+
font-style: normal;
4+
font-weight: 400;
5+
font-display: swap;
6+
src: url("./IBMPlexMono-Regular.woff2") format("woff2");
7+
}

0 commit comments

Comments
 (0)