fix(theme): improve Chinese font handling

close #2036
pull/2104/head
Evan You 2 years ago
parent 9b85e435fe
commit 81ae1c79cd

@ -26,7 +26,7 @@ body {
color: var(--vp-c-text-1);
background-color: var(--vp-c-bg);
direction: ltr;
font-synthesis: none;
font-synthesis: style;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;

@ -155,3 +155,11 @@ html body {
unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1,
U+01AF-01B0, U+1EA0-1EF9, U+20AB;
}
/* Chinese quotes rendering fix. 中英文弯引号共享 Unicode 码位,确保引号使用中文字体渲染 */
@font-face {
font-family: 'Chinese Quotes';
src: local('PingFang SC Regular'), local('PingFang SC'), local('SimHei'),
local('Source Han Sans SC');
unicode-range: U+2018, U+2019, U+201C, U+201D; /* 分别是 ‘’“” */
}

@ -143,10 +143,10 @@
* -------------------------------------------------------------------------- */
:root {
--vp-font-family-base: 'Inter var', 'Inter', ui-sans-serif, system-ui,
-apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue',
Helvetica, Arial, 'Noto Sans', sans-serif, 'Apple Color Emoji',
'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--vp-font-family-base: 'Chinese Quotes', 'Inter var', 'Inter', ui-sans-serif,
system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
'Helvetica Neue', Helvetica, Arial, 'Noto Sans', sans-serif,
'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji';
--vp-font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Monaco,
Consolas, 'Liberation Mono', 'Courier New', monospace;
}

Loading…
Cancel
Save