Skip to content

Instantly share code, notes, and snippets.

@alphatr
Created April 19, 2016 07:22
Show Gist options
  • Save alphatr/590c57f72bd93e1a1f478de5b8213590 to your computer and use it in GitHub Desktop.
Save alphatr/590c57f72bd93e1a1f478de5b8213590 to your computer and use it in GitHub Desktop.
css 中使用中文使用宋体/楷体,对应英文的斜体
/* 斜体方案1,Georgia 斜体 + 华文楷体粗 */
@font-face {
font-family: 'italic-alpha';
unicode-range: U+0000-00FF;
src: local('Georgia-Italic');
}
@font-face {
font-family: 'italic-alpha';
unicode-range: U+4E00-9FFF;
src: local('STKaiti-SC-Bold');
}
/* 斜体方案2,Noto Serif 斜体 + 华文楷体粗 */
@font-face {
font-family: 'italic-beta';
unicode-range: U+0000-00FF;
src: local('NotoSerif-Italic');
}
@font-face {
font-family: 'italic-beta';
unicode-range: U+4E00-9FFF;
src: local('STKaiti-SC-Bold');
}
body {
font-family: 'italic-beta';
line-height: 190%;
font-size: 17px;
color: #333;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment