Skip to content

Commit 2c6b784

Browse files
committed
优化字体加载
1 parent c9eeb3d commit 2c6b784

5 files changed

Lines changed: 4 additions & 4 deletions

File tree

68.5 KB
Binary file not shown.
-16.9 MB
Binary file not shown.
-7.4 MB
Binary file not shown.

docs/stylesheets/extra.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,11 @@ img[alt="logo"] {
5353

5454
@font-face {
5555
font-family: "Noto Sans SC - local";
56-
src: url("NotoSansSC-VariableFont_wght.woff2") format("woff2"),
57-
url("NotoSansSC-VariableFont_wght.ttf") format("truetype");
56+
src: url("NotoSansSC-UI-subset.woff") format("woff");
5857
font-display: swap;
5958
font-style: normal;
60-
font-weight: 100 900;
59+
font-weight: 400;
60+
unicode-range: U+0000-00FF, U+2013, U+2014, U+2018, U+2019, U+201C, U+201D, U+2022, U+3001, U+3002, U+300A, U+300B;
6161
}
6262
:root {
6363
--md-text-font: "Noto Sans SC - local", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", "Segoe UI", Arial, sans-serif;

overrides/main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
{% block extrahead %}
44
{{ super() }}
5-
<link rel="preload" href="{{ 'stylesheets/NotoSansSC-VariableFont_wght.woff2' | url }}" as="font" type="font/woff2" crossorigin>
5+
<link rel="preload" href="{{ 'stylesheets/NotoSansSC-UI-subset.woff' | url }}" as="font" type="font/woff" crossorigin>
66
{% endblock %}

0 commit comments

Comments
 (0)