Skip to content

Commit 058247f

Browse files
committed
Replace google fonts with self split woff2
1 parent 8c73e28 commit 058247f

File tree

9 files changed

+2954
-3883
lines changed

9 files changed

+2954
-3883
lines changed

npm/dist/assets/blog-font.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/dist/assets/blog-post.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/dist/assets/blog-scaffold.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

npm/src/component/font/_NotoSerifSC.scss

Lines changed: 2940 additions & 395 deletions
Large diffs are not rendered by default.

npm/src/component/font/_NotoSerifSCVariable.scss

Lines changed: 0 additions & 3460 deletions
This file was deleted.

npm/src/component/react/GridIndexList.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@
8484
}
8585

8686
.grid-index-description {
87-
// font-family: base.$text-font-wenkai-noto-color-emoji;
8887
margin: 0;
8988
// filter: grayscale(100%);
9089
}

npm/src/component/text.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ a {
145145
// Safari
146146
-webkit-text-underline-offset: 0.18rem;
147147
// Chrome, Firefox
148-
text-underline-offset: 0.15rem;
148+
text-underline-offset: 0.13rem;
149149
// 下划线粗细
150150
text-decoration-thickness: 1px;
151151
// 去除移动版Chrome点击时默认的蓝色背景
@@ -270,6 +270,7 @@ audio {
270270
.font-handwritten, .font-handwritten *,
271271
.font-no-change, .font-no-change *) {
272272
font-family: base.$text-font-noto-serif;
273+
--mdc-typography-body1-font-size: 1rem;
273274
--mdc-typography-body1-line-height: calc(var(--mdc-typography-body1-font-size) + 0.8rem);
274275
}
275276

npm/src/component/theme.scss

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
// 先引入mdc的theme,然后用自定义变量覆盖其原有配置
33
@use "@material/theme";
44
@use "@material/theme/mdc-theme";
5-
@use "@material/typography" with ($font-family: base.$text-font-wenkai);
5+
@use "@material/typography";
66
@use "@material/typography/mdc-typography";
77
@use "sass:map";
88
@use "sass:color";
@@ -66,17 +66,6 @@
6666
--surface-block-border: #{map.get(base.$surface-block-border-dashed, "light")};
6767
--surface-block-bg: #{map.get(base.$surface-block-bg, "light")};
6868
--surface-block-ink-strong: #{map.get(base.$surface-block-ink-strong, "light")};
69-
70-
--pagefind-ui-primary: var(--mdc-theme-on-surface);
71-
--pagefind-ui-text: var(--mdc-theme-on-surface);
72-
--pagefind-ui-background: var(--mdc-theme-surface);
73-
--pagefind-ui-border: var(--divider-color);
74-
--pagefind-ui-tag: var(--code-highlight-bg);
75-
--pagefind-ui-border-width: 2px;
76-
--pagefind-ui-border-radius: 8px;
77-
--pagefind-ui-image-border-radius: 8px;
78-
--pagefind-ui-image-box-ratio: 3 / 2;
79-
--pagefind-ui-font: $text-font-wenkai;
8069
}
8170

8271
@mixin dark {
@@ -134,7 +123,7 @@
134123
body {
135124
--mdc-typography-font-family: #{base.$text-font-wenkai};
136125

137-
--mdc-typography-body1-font-size: 1rem;
126+
--mdc-typography-body1-font-size: 1.02rem;
138127
--mdc-typography-body1-line-height: calc(var(--mdc-typography-body1-font-size) + 0.8rem);
139128
--mdc-typography-body1-letter-spacing: 0.03rem;
140129

npm/src/style/_variables.scss

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
@use "sass:string";
22

33
// 霞鹜文楷GB
4-
$text-font-wenkai: string.unquote("Noto Serif Sub, LXGW WenKai GB, ui-serif, sans-serif, system-ui");
5-
// $text-font-wenkai-noto-emoji: string.unquote("Noto Serif Sub, LXGW WenKai GB, Noto Emoji, ui-serif, sans-serif, system-ui");
6-
$text-font-wenkai-noto-color-emoji: string.unquote("Noto Serif Sub, LXGW WenKai GB, Noto Color Emoji, ui-serif, sans-serif, system-ui");
4+
$text-font-wenkai: string.unquote("Noto Serif Sub, LXGW WenKai GB, sans-serif");
75
// 思源宋体
8-
$text-font-noto-serif: string.unquote("Noto Serif Sub, Noto Serif SC, ui-serif, serif, system-ui");
9-
$text-font-noto-serif-noto-color-emoji: string.unquote("Noto Serif Sub, Noto Serif SC, Noto Color Emoji, ui-serif, serif, system-ui");
6+
$text-font-noto-serif: string.unquote("Noto Serif Sub, Noto Serif SC, sans-serif");
107
// 思源黑体
11-
$text-font-noto-sans: string.unquote("Noto Serif Sub, Noto Sans SC, ui-sans-serif, sans-serif, system-ui");
12-
$text-font-noto-sans-noto-color-emoji: string.unquote("Noto Serif Sub, Noto Sans SC, ui-sans-serif, sans-serif, system-ui");
8+
$text-font-noto-sans: string.unquote("Noto Serif Sub, Noto Sans SC, sans-serif");
139
// 兰亭题序国风行楷
14-
$handwritten-font: string.unquote("AaLTTXGFXK, LXGW WenKai GB, ui-serif, serif, system-ui");
10+
$handwritten-font: string.unquote("AaLTTXGFXK, LXGW WenKai GB, sans-serif");
1511
// 索引页的许静行楷
16-
$handwritten-font-index: string.unquote("HYXuJingXingKaiW, LXGW WenKai GB, ui-serif, serif, system-ui");
12+
$handwritten-font-index: string.unquote("HYXuJingXingKaiW, LXGW WenKai GB, sans-serif");
1713
// 代码字体,等宽
18-
$code-block-font: string.unquote("LXGW WenKai Mono GB, ui-monospace, monospace, system-ui");
14+
$code-block-font: string.unquote("LXGW WenKai Mono GB, monospace, sans-serif");
15+
$code-block-font-sans: string.unquote("JetBrainsMono, Noto Sans SC, monospace, sans-serif");
1916

2017
// 中型屏幕宽度范围,定义为平板,小于此尺寸为手机,大于此尺寸为电脑
2118
$screen-middle-min-width: 600px;

0 commit comments

Comments
 (0)