Skip to content

Commit abbea9f

Browse files
authored
update fonts for better readability, removed satoshi font (#249)
1 parent cb28431 commit abbea9f

File tree

11 files changed

+49
-39
lines changed

11 files changed

+49
-39
lines changed

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,16 @@ export default withMermaid(
9292

9393
head: [
9494
["link", { rel: "icon", href: "/logo/favicon-32x32.png" }],
95+
[
96+
"link",
97+
{
98+
rel: "preload",
99+
href: "/fonts/Inter/InterVariable.woff2",
100+
as: "font",
101+
type: "font/woff2",
102+
crossorigin: "",
103+
},
104+
],
95105

96106
// Google Analytics with Consent Mode v2
97107
["script", { async: "", src: "https://www.googletagmanager.com/gtag/js?id=G-JF828SKW90" }],

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

Lines changed: 39 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -93,45 +93,13 @@
9393
}
9494

9595
/* ================================================
96-
SATOSHI FONT
96+
INTER VARIABLE FONT
9797
================================================ */
9898

9999
@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-
109-
@font-face {
110-
font-family: "Satoshi";
111-
src:
112-
url("/fonts/Satoshi/Satoshi-Regular.woff2") format("woff2"),
113-
url("/fonts/Satoshi/Satoshi-Regular.woff") format("woff");
114-
font-weight: 400;
115-
font-style: normal;
116-
font-display: swap;
117-
}
118-
119-
@font-face {
120-
font-family: "Satoshi";
121-
src:
122-
url("/fonts/Satoshi/Satoshi-Medium.woff2") format("woff2"),
123-
url("/fonts/Satoshi/Satoshi-Medium.woff") format("woff");
124-
font-weight: 500;
125-
font-style: normal;
126-
font-display: swap;
127-
}
128-
129-
@font-face {
130-
font-family: "Satoshi";
131-
src:
132-
url("/fonts/Satoshi/Satoshi-Bold.woff2") format("woff2"),
133-
url("/fonts/Satoshi/Satoshi-Bold.woff") format("woff");
134-
font-weight: 700;
100+
font-family: "Inter";
101+
src: url("/fonts/Inter/InterVariable.woff2") format("woff2");
102+
font-weight: 100 900;
135103
font-style: normal;
136104
font-display: swap;
137105
}
@@ -187,12 +155,44 @@
187155

188156
/* Fonts */
189157
--vp-font-family-base:
190-
"Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
158+
"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
191159
--vp-font-family-mono:
192160
"IBM Plex Mono", ui-monospace, SFMono-Regular, "SF Mono", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New",
193161
monospace;
194162
}
195163

164+
/* Font rendering optimizations */
165+
body {
166+
-webkit-font-smoothing: antialiased;
167+
-moz-osx-font-smoothing: grayscale;
168+
text-rendering: optimizeLegibility;
169+
font-feature-settings:
170+
"cv01" on,
171+
"cv02" on,
172+
"zero" on;
173+
}
174+
175+
/* Typography tuning for Inter readability */
176+
.vp-doc {
177+
line-height: 1.7;
178+
letter-spacing: -0.011em;
179+
}
180+
181+
.vp-doc h1 {
182+
letter-spacing: -0.022em;
183+
line-height: 1.2;
184+
}
185+
186+
.vp-doc h2 {
187+
letter-spacing: -0.017em;
188+
line-height: 1.3;
189+
}
190+
191+
.vp-doc h3 {
192+
letter-spacing: -0.014em;
193+
line-height: 1.4;
194+
}
195+
196196
/* Dark mode */
197197
.dark {
198198
--vp-c-bg: #0a0a0a;
@@ -299,7 +299,7 @@
299299
font-weight: 700;
300300
padding: 5px 12px;
301301
border-radius: 6px;
302-
font-family: ui-monospace, SFMono-Regular, monospace;
302+
font-family: var(--vp-font-family-mono);
303303
text-transform: uppercase;
304304
}
305305

@@ -346,7 +346,7 @@
346346
}
347347

348348
.api-endpoint-badge .path {
349-
font-family: ui-monospace, SFMono-Regular, monospace;
349+
font-family: var(--vp-font-family-mono);
350350
font-size: 14px;
351351
color: #6b7280;
352352
}
344 KB
Binary file not shown.
-32.2 KB
Binary file not shown.
-24.7 KB
Binary file not shown.
-28.6 KB
Binary file not shown.
-22.3 KB
Binary file not shown.
-32.5 KB
Binary file not shown.
-25 KB
Binary file not shown.
-32.3 KB
Binary file not shown.

0 commit comments

Comments
Β (0)