From 7ef60484f3e85523c12dd8febb0c2c7f04b3d5ca Mon Sep 17 00:00:00 2001 From: camera-2018 <2907618001@qq.com> Date: Mon, 24 Jul 2023 00:42:05 +0800 Subject: [PATCH] style(font): re swap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 🤔群里听戴兜佬说还是要分片 不然前端会被字体加载阻塞 -- 而且wiki在前端阻塞载入了一整套中文字体 --- .vitepress/theme/style.css | 29 +++-------------------------- 1 file changed, 3 insertions(+), 26 deletions(-) diff --git a/.vitepress/theme/style.css b/.vitepress/theme/style.css index c3fcf40..58c8f87 100644 --- a/.vitepress/theme/style.css +++ b/.vitepress/theme/style.css @@ -5,6 +5,9 @@ /** * Colors * -------------------------------------------------------------------------- */ + +@import url('https://fonts.loli.net/css2?family=Noto+Sans+Mono&family=Noto+Sans+SC:wght@400;700&display=swap'); + @font-face { font-family: 'Noto Color Emoji'; font-style: normal; @@ -14,24 +17,6 @@ unicode-range: U+200d, U+261d, U+2620, U+2639-263a, U+2665, U+270a-270d, U+2728, U+2763-2764, U+2b50, U+fe0f, U+1f31a-1f31f, U+1f32b, U+1f383, U+1f389, U+1f3fb-1f3ff, U+1f440-1f450, U+1f463-1f465, U+1f479-1f47b, U+1f47d-1f480, U+1f485, U+1f48b-1f48c, U+1f493-1f49f, U+1f4a4-1f4a6, U+1f4a8-1f4ab, U+1f4af, U+1f525, U+1f573, U+1f590, U+1f595-1f596, U+1f5a4, U+1f5e3, U+1f600-1f644, U+1f648-1f64a, U+1f64c, U+1f64f, U+1f90c-1f925, U+1f927-1f92f, U+1f932-1f933, U+1f970-1f976, U+1f978-1f97a, U+1f9a0, U+1f9b4-1f9b7, U+1f9bb, U+1f9be-1f9bf, U+1f9d0, U+1f9e0-1f9e1, U+1fa75-1fa79, U+1fac0-1fac2, U+1fae0-1fae6, U+1fae8, U+1faf0-1faf8; } -@font-face { - font-family: 'Noto Sans SC'; - font-weight: 400; - src: url('./font/NotoSansSC-Regular.otf'); -} - -@font-face { - font-family: 'Noto Sans SC'; - font-weight: 700; - src: url('./font/NotoSansSC-Bold.otf'); -} - -@font-face { - font-family: 'Noto Sans Mono'; - font-weight: 400; - src: url('./font/NotoSansMono-Regular.ttf'); -} - .dark .vp-doc a,#loading, .dark .vp-doc a>code, .dark .VPNavBarMenuLink.VPNavBarMenuLink:hover, .dark .VPNavBarMenuLink.VPNavBarMenuLink.active, .dark .link.link:hover, .dark .link.link.active, .dark .edit-link-button.edit-link-button, .dark .pager-link .title { color: var(--vp-c-brand-lighter); } @@ -50,14 +35,6 @@ --vp-font-family-base: 'Noto Sans SC', 'Noto Color Emoji', sans-serif; --vp-font-family-mono: 'Noto Sans Mono', sans-serif, monospace, consolas; } -/** - * 这个版本可能有 bug,build 后字体变不了还为 consolas 可能是我自己配的有问题 可能是这个版本拉了 总之就加个临时的 - * -------------------------------------------------------------------------- */ -code { - font-family: 'Noto Sans Mono', sans-serif, monospace, consolas !important; - font-weight: 400 !important; - font-size: 14px !important; -} /** * Component: Button