Skip to content

Commit 3ad4301

Browse files
committed
fix: updated fonts on the entire site for better readability
1 parent 224c2c0 commit 3ad4301

23 files changed

Lines changed: 86 additions & 23 deletions

β€Ždocs/.vitepress/config.mtsβ€Ž

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,38 @@ export default withMermaid(
9393
head: [
9494
["link", { rel: "icon", href: "/logo/favicon-32x32.png" }],
9595

96+
// Font preloads for critical rendering
97+
[
98+
"link",
99+
{
100+
rel: "preload",
101+
href: "/fonts/Inter/Inter-roman.var.woff2",
102+
as: "font",
103+
type: "font/woff2",
104+
crossorigin: "",
105+
},
106+
],
107+
[
108+
"link",
109+
{
110+
rel: "preload",
111+
href: "/fonts/Satoshi/Satoshi-Medium.woff2",
112+
as: "font",
113+
type: "font/woff2",
114+
crossorigin: "",
115+
},
116+
],
117+
[
118+
"link",
119+
{
120+
rel: "preload",
121+
href: "/fonts/Satoshi/Satoshi-Bold.woff2",
122+
as: "font",
123+
type: "font/woff2",
124+
crossorigin: "",
125+
},
126+
],
127+
96128
// Google Analytics with Consent Mode v2
97129
["script", { async: "", src: "https://www.googletagmanager.com/gtag/js?id=G-JF828SKW90" }],
98130
[

β€Ždocs/.vitepress/theme/components/ApiParam.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ const isExpanded = ref(true);
5656
align-items: center;
5757
gap: 6px;
5858
cursor: pointer;
59-
font-family: ui-monospace, SFMono-Regular, monospace;
59+
font-family: var(--vp-font-family-mono);
6060
font-size: 14px;
6161
}
6262

β€Ždocs/.vitepress/theme/components/CodePanel.vueβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ const copyCode = async () => {
103103
}
104104
105105
.panel-title {
106-
font-size: 13px;
106+
font-size: 14px;
107107
font-weight: 500;
108108
color: #374151;
109109
}

β€Ždocs/.vitepress/theme/components/CookieConsent.vueβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ onMounted(() => {
102102
103103
.consent-text {
104104
margin: 0;
105-
font-size: 13px;
105+
font-size: 14px;
106106
line-height: 1.5;
107107
color: var(--vp-c-text-2);
108108
flex: 1;
@@ -117,7 +117,7 @@ onMounted(() => {
117117
.consent-btn {
118118
padding: 6px 16px;
119119
border-radius: 6px;
120-
font-size: 13px;
120+
font-size: 14px;
121121
font-weight: 500;
122122
cursor: pointer;
123123
border: none;

β€Ždocs/.vitepress/theme/components/ResponsePanel.vueβ€Ž

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const statusClass = () => {
9595
}
9696
9797
.response-label {
98-
font-size: 13px;
98+
font-size: 14px;
9999
font-weight: 500;
100100
color: #374151;
101101
}
@@ -105,8 +105,8 @@ const statusClass = () => {
105105
}
106106
107107
.status-code {
108-
font-family: ui-monospace, SFMono-Regular, monospace;
109-
font-size: 13px;
108+
font-family: var(--vp-font-family-mono);
109+
font-size: 14px;
110110
font-weight: 600;
111111
}
112112

β€Ždocs/.vitepress/theme/style.cssβ€Ž

Lines changed: 47 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,6 @@
9696
SATOSHI FONT
9797
================================================ */
9898

99-
@font-face {
100-
font-family: "Satoshi";
101-
src:
102-
url("/fonts/Satoshi/Satoshi-Light.woff2") format("woff2"),
103-
url("/fonts/Satoshi/Satoshi-Light.woff") format("woff");
104-
font-weight: 300;
105-
font-style: normal;
106-
font-display: swap;
107-
}
108-
10999
@font-face {
110100
font-family: "Satoshi";
111101
src:
@@ -136,37 +126,57 @@
136126
font-display: swap;
137127
}
138128

129+
/* ================================================
130+
INTER VARIABLE FONT (FOR BODY TEXT)
131+
================================================ */
132+
133+
@font-face {
134+
font-family: "Inter";
135+
src: url("/fonts/Inter/Inter-roman.var.woff2") format("woff2-variations");
136+
font-weight: 100 900;
137+
font-style: normal;
138+
font-display: swap;
139+
}
140+
139141
/* ================================================
140142
IBM PLEX MONO FONT (FOR CODE BLOCKS)
141143
================================================ */
142144

143145
@font-face {
144146
font-family: "IBM Plex Mono";
145-
src: url("/fonts/IBMPlexMono/IBMPlexMono-Regular.ttf") format("truetype");
147+
src:
148+
url("/fonts/IBMPlexMono/IBMPlexMono-Regular.woff2") format("woff2"),
149+
url("/fonts/IBMPlexMono/IBMPlexMono-Regular.ttf") format("truetype");
146150
font-weight: 400;
147151
font-style: normal;
148152
font-display: swap;
149153
}
150154

151155
@font-face {
152156
font-family: "IBM Plex Mono";
153-
src: url("/fonts/IBMPlexMono/IBMPlexMono-Medium.ttf") format("truetype");
157+
src:
158+
url("/fonts/IBMPlexMono/IBMPlexMono-Medium.woff2") format("woff2"),
159+
url("/fonts/IBMPlexMono/IBMPlexMono-Medium.ttf") format("truetype");
154160
font-weight: 500;
155161
font-style: normal;
156162
font-display: swap;
157163
}
158164

159165
@font-face {
160166
font-family: "IBM Plex Mono";
161-
src: url("/fonts/IBMPlexMono/IBMPlexMono-SemiBold.ttf") format("truetype");
167+
src:
168+
url("/fonts/IBMPlexMono/IBMPlexMono-SemiBold.woff2") format("woff2"),
169+
url("/fonts/IBMPlexMono/IBMPlexMono-SemiBold.ttf") format("truetype");
162170
font-weight: 600;
163171
font-style: normal;
164172
font-display: swap;
165173
}
166174

167175
@font-face {
168176
font-family: "IBM Plex Mono";
169-
src: url("/fonts/IBMPlexMono/IBMPlexMono-Bold.ttf") format("truetype");
177+
src:
178+
url("/fonts/IBMPlexMono/IBMPlexMono-Bold.woff2") format("woff2"),
179+
url("/fonts/IBMPlexMono/IBMPlexMono-Bold.ttf") format("truetype");
170180
font-weight: 700;
171181
font-style: normal;
172182
font-display: swap;
@@ -187,12 +197,33 @@
187197

188198
/* Fonts */
189199
--vp-font-family-base:
200+
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
201+
--vp-font-family-heading:
190202
"Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
191203
--vp-font-family-mono:
192204
"IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
193205
monospace;
194206
}
195207

208+
/* Headings use Satoshi (display/geometric sans) */
209+
.vp-doc h1,
210+
.vp-doc h2,
211+
.vp-doc h3,
212+
.vp-doc h4,
213+
.vp-doc h5,
214+
.vp-doc h6,
215+
.VPNavBar .title,
216+
.VPHero .name,
217+
.VPHero .tagline {
218+
font-family: var(--vp-font-family-heading);
219+
}
220+
221+
/* Improved body text line-height for readability */
222+
.vp-doc p,
223+
.vp-doc li {
224+
line-height: 1.75;
225+
}
226+
196227
/* Dark mode */
197228
.dark {
198229
--vp-c-bg: #0a0a0a;
@@ -299,7 +330,7 @@
299330
font-weight: 700;
300331
padding: 5px 12px;
301332
border-radius: 6px;
302-
font-family: ui-monospace, SFMono-Regular, monospace;
333+
font-family: var(--vp-font-family-mono);
303334
text-transform: uppercase;
304335
}
305336

@@ -346,7 +377,7 @@
346377
}
347378

348379
.api-endpoint-badge .path {
349-
font-family: ui-monospace, SFMono-Regular, monospace;
380+
font-family: var(--vp-font-family-mono);
350381
font-size: 14px;
351382
color: #6b7280;
352383
}
39.1 KB
Binary file not shown.
-139 KB
Binary file not shown.
-131 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
Β (0)