Skip to content

Commit 78bda33

Browse files
committed
Change font to Inter
1 parent 1c153f9 commit 78bda33

5 files changed

Lines changed: 15 additions & 18 deletions

File tree

.changeset/brown-adults-look.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'hexo-theme-cupertino': minor
3+
---
4+
5+
Change font to Inter.

layout/_partial/head.ejs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939

4040
<%- open_graph() %>
4141

42+
<link rel="preconnect" href="https://rsms.me/">
43+
<link rel="stylesheet" href="https://rsms.me/inter/inter.css">
4244
<% if (theme.simple_icons) { %>
4345
<%- css(getCdnUrl('simple-icons-font', 'v13', 'font/simple-icons.min.css')) %>
4446
<% } %>

source/css/main.scss

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,14 @@ body {
77
margin-top: 56px;
88
color: var(--color-text-primary);
99
background-color: var(--color-background-primary);
10-
font-family:
11-
'SF Pro Display',
12-
-apple-system,
13-
BlinkMacSystemFont,
14-
'Segoe UI',
15-
Roboto,
16-
'Helvetica Neue',
17-
Arial,
18-
'Noto Sans',
19-
sans-serif,
20-
'Apple Color Emoji',
21-
'Segoe UI Emoji',
22-
'Segoe UI Symbol',
23-
'Noto Color Emoji';
10+
font-family: Inter, sans-serif, system-ui;
11+
font-feature-settings:
12+
'liga' 1,
13+
'calt' 1; /* fix for Chrome */
14+
15+
@supports (font-variation-settings: normal) {
16+
font-family: InterVariable, sans-serif, system-ui;
17+
}
2418
}
2519

2620
a {
@@ -69,7 +63,6 @@ a {
6963
font-size: 32px;
7064
line-height: 1.125;
7165
font-weight: 700;
72-
letter-spacing: 0.004em;
7366
margin-bottom: 24px;
7467
color: var(--color-text-primary);
7568
}

source/css/post-list.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
font-size: 24px;
4444
line-height: 1.16667;
4545
font-weight: 700;
46-
letter-spacing: 0.009em;
4746
max-height: 7em;
4847
overflow: hidden;
4948
}
@@ -95,7 +94,6 @@
9594
font-size: 14px;
9695
line-height: 1.28577;
9796
font-weight: 600;
98-
letter-spacing: -0.016em;
9997
display: block;
10098
margin-top: 12px;
10199
color: var(--color-text-secondary);

source/css/post.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
font-size: 19px;
5353
line-height: 1.4211;
5454
font-weight: 400;
55-
letter-spacing: 0.012em;
5655
}
5756

5857
/* only `#{$content} > pre`, do not include <pre /> in <figure /> */

0 commit comments

Comments
 (0)