feat(theme): optimize cn font family (#357)

This commit is contained in:
pengzhanbo 2024-11-26 13:54:26 +08:00 committed by GitHub
parent 980727e1c1
commit d11dd2d12c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 83 additions and 22 deletions

View File

@ -238,13 +238,86 @@
U+FFFD; U+FFFD;
} }
/* Chinese quotes rendering fix. 中英文弯引号共享 Unicode 码位,确保引号使用中文字体渲染 */
@font-face { @font-face {
font-family: "Chinese Quotes"; font-family: "Punctuation SC";
font-weight: 400;
src: src:
local("PingFang SC Regular"), local("PingFang SC Regular"),
local("PingFang SC"), local("Noto Sans CJK SC"),
local("SimHei"), local("Microsoft YaHei");
local("Source Han Sans SC"); unicode-range:
unicode-range: U+2018, U+2019, U+201C, U+201D; /* 分别是 ‘’“” */ U+201C,
U+201D,
U+2018,
U+2019,
U+2E3A,
U+2014,
U+2013,
U+2026,
U+00B7,
U+007E,
U+002F;
}
@font-face {
font-family: "Punctuation SC";
font-weight: 500;
src:
local("PingFang SC Medium"),
local("Noto Sans CJK SC"),
local("Microsoft YaHei");
unicode-range:
U+201C,
U+201D,
U+2018,
U+2019,
U+2E3A,
U+2014,
U+2013,
U+2026,
U+00B7,
U+007E,
U+002F;
}
@font-face {
font-family: "Punctuation SC";
font-weight: 600;
src:
local("PingFang SC Semibold"),
local("Noto Sans CJK SC Bold"),
local("Microsoft YaHei Bold");
unicode-range:
U+201C,
U+201D,
U+2018,
U+2019,
U+2E3A,
U+2014,
U+2013,
U+2026,
U+00B7,
U+007E,
U+002F;
}
@font-face {
font-family: "Punctuation SC";
font-weight: 700;
src:
local("PingFang SC Semibold"),
local("Noto Sans CJK SC Bold"),
local("Microsoft YaHei Bold");
unicode-range:
U+201C,
U+201D,
U+2018,
U+2019,
U+2E3A,
U+2014,
U+2013,
U+2026,
U+00B7,
U+007E,
U+002F;
} }

View File

@ -260,25 +260,19 @@
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
:root { :root {
--vp-font-family-base: --vp-font-family-base:
"Chinese Quotes", "Inter",
inter,
ui-sans-serif, ui-sans-serif,
system-ui, system-ui,
sans-serif, sans-serif,
"Apple Color Emoji", "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Emoji",
"Segoe UI Symbol", "Segoe UI Symbol",
"Noto Color Emoji",
"Apple Color Emoji",
"Segoe UI Emoji",
"Segoe UI Symbol",
"Noto Color Emoji"; "Noto Color Emoji";
--vp-font-family-mono: --vp-font-family-mono:
ui-monospace, ui-monospace,
sfmono-regular, "Menlo",
menlo, "Monaco",
monaco, "Consolas",
consolas,
"Liberation Mono", "Liberation Mono",
"Courier New", "Courier New",
monospace; monospace;
@ -293,12 +287,6 @@
"Inter", "Inter",
ui-sans-serif, ui-sans-serif,
system-ui, system-ui,
"PingFang SC",
"Noto Sans CJK SC",
"Noto Sans SC",
"Heiti SC",
"Microsoft YaHei",
"DengXian",
sans-serif, sans-serif,
"Apple Color Emoji", "Apple Color Emoji",
"Segoe UI Emoji", "Segoe UI Emoji",