typora-theme-next
typora-theme-next copied to clipboard
能否将中文字体的斜体修改为宋体或者楷体
中文斜体的显示效果几乎为0,所以中文字体的斜体修改为宋体或者楷体会更适合一点。
由于并不是很懂css,我尝试修改了一下 添加了一个中文斜体的font-family
@font-face {
font-family: 'ChineseItalic';
font-style: italic;
font-weight: 300;
font-display: swap;
src: url('next/JetBrainsMono-Regular.ttf') format('truetype');
unicode-range: U+4E00-9FFF;
}
修改了字体
html,
body,
#write {
color: var(--text-color);
font-size: var(--base-font-size);
background: #ffffff;
font-family: Overpass, "ChineseItalic" ,"GlowSansSC", "Helvetica Neue", "pingfang sc", "microsoft yahei", sans-serif;
font-weight: 400;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
/* letter-spacing: -0.5px; */
}
但是似乎不起作用。
你可以这样修改你添加的 font-family:
@font-face {
font-family: 'ChineseItalic';
font-style: italic;
font-weight: 400;
src: local('Songti SC Regular'); /* 本地字体名字 */
}
然后修改字体将 ChineseItalic
放在首位:
html,
body,
#write {
color: var(--text-color);
font-size: var(--base-font-size);
background: #ffffff;
font-family: "ChineseItalic", Overpass ,"GlowSansSC", "Helvetica Neue", "pingfang sc", "microsoft yahei", sans-serif;
font-weight: 400;
line-height: 1.15;
-webkit-text-size-adjust: 100%;
/* letter-spacing: -0.5px; */
}