Skip to content

Commit

Permalink
Adjust font stack and fix italics (#461)
Browse files Browse the repository at this point in the history
Co-authored-by: Percy Ma <kecrily@gmail.com>
  • Loading branch information
huijing and kecrily committed May 25, 2022
1 parent 06f9a70 commit 870ecf7
Showing 1 changed file with 39 additions and 2 deletions.
41 changes: 39 additions & 2 deletions local.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
@font-face {
font-family: 'Punctuation SC';
src: local('PingFang SC'), local('Noto Sans SC'), local('Noto Sans CJK SC'), local('Heiti 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; /* Unicode range for punctuation marks */
}

@font-face {
font-family: 'Punctuation TC';
src: local('PingFang TC'), local('Noto Sans TC'), local('Noto Sans CJK TC'), local('Heiti TC'), local('Microsoft JhengHei');
unicode-range: U+201C, U+201D, U+2018, U+2019, U+2E3A, U+2014, U+2013, U+2026, U+00B7, U+007E, U+002F; /* Unicode range for punctuation marks */
}

/*
-apple-system: iOS Safari, macOS Safari, macOS Firefox
BlinkMacSystemFont: macOS Chrome
Segoe UI: Windows
Roboto: Android, Chrome OS
Oxygen-Sans: KDE
Fira Sans: Firefox OS
Droid Sans: Older versions of Android
Ubuntu: Ubuntu
Cantarell: GNOME
Helvetica Neue: macOS versions < 10.11
Arial: Any
PingFang TC/SC: macOS
Noto Sans TC/SC: Ubuntu, Android
Noto Sans CJK TC/SC: Ubuntu, Android
Heiti TC/SC: macOS
DengXian: Windows
Microsoft Jhenghei / Microsoft Yahei: Windows < Vista
sans-serif: Fallback
*/

[lang=zh-hant] {
font-family: 'PingFang TC', 'Noto Sans CJK TC', 'Heiti TC', 'Microsoft JhengHei', Helvetica, 'Segoe UI', Arial, sans-serif;
font-family: 'Punctuation TC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', 'PingFang TC', 'Noto Sans TC', 'Noto Sans CJK TC', 'Heiti TC', 'Microsoft JhengHei', sans-serif;
}

[lang=zh-hans] {
font-family: 'PingFang SC', 'Noto Sans CJK SC', 'Heiti SC', 'DengXian', 'Microsoft YaHei', Helvetica, 'Segoe UI', Arial, sans-serif;
font-family: 'Punctuation SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', 'PingFang SC', 'Noto Sans SC', 'Noto Sans CJK SC', 'Heiti SC', 'DengXian', 'Microsoft YaHei', sans-serif;
}

h2 {
Expand Down Expand Up @@ -61,6 +94,10 @@ figcaption {
font-size: 90%;
}

span:lang(zh) {
font-style: normal;
}

.figno:after {
content: ':\00A0 ';
}
Expand Down

0 comments on commit 870ecf7

Please sign in to comment.