chore(fonts): update font files and font-family declarations

- Update font files for different languages: NotoSansCJKsc-Regular.woff2, NotoSansCJKtc-Regular.woff2, NotoSansCJKjp-Regular.woff2, NotoSansCJKkr-Regular.woff2, NotoSans-Regular.woff2
- Update font-family declarations in _typography.scss to use the new font files:
  - Change font-family for body to 'sans-serif'
  - Change font-family for button to 'Noto Sans', sans-serif
- Add font-family declarations for different languages in _typography.scss:
  - For English language (en), use 'Geist', sans-serif
  - For Simplified Chinese language (zh-cn, zh-sg), use 'Noto Sans', 'Noto Sans CJK SC', sans-serif
  - For Traditional Chinese language (zh-hk, zh-mo, zh-tw), use 'Noto Sans', 'Noto Sans CJK TC', sans-serif
  - For Japanese language (ja), use 'Noto Sans', 'Noto Sans CJK JP', sans-serif
  - For Korean language (ko), use 'Noto Sans', 'Noto Sans CJK KR', sans-serif
This commit is contained in:
Sped0n
2023-11-03 08:47:11 +08:00
parent f5ebeead9e
commit 2229c56b1e
8 changed files with 58 additions and 32 deletions

View File

@@ -7,7 +7,41 @@
}
@font-face {
font-family: 'fw';
src: url('/lib/fonts/fw.svg') format('svg');
font-family: 'Noto Sans CJK SC';
src: url('/lib/fonts/NotoSansCJKsc-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noto Sans CJK TC';
src: url('/lib/fonts/NotoSansCJKtc-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noto Sans CJK JP';
src: url('/lib/fonts/NotoSansCJKjp-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noto Sans CJK KR';
src: url('/lib/fonts/NotoSansCJKkr-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'Noto Sans';
src: url('/lib/fonts/NotoSans-Regular.woff2') format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
}

View File

@@ -3,10 +3,10 @@
body {
line-height: 1.2;
font-size: 16px;
font-family: 'Geist', helvetica, arial, sans-serif;
font-family: sans-serif;
button {
font-family: 'fw', sans-serif;
font-family: 'Noto Sans', sans-serif;
}
@include min-width('tablet') {
@@ -16,3 +16,23 @@ body {
font-size: 19px;
}
}
body:lang(en) {
font-family: 'Geist', sans-serif;
}
body:lang(zh-cn, zh-sg) {
font-family: 'Noto Sans', 'Noto Sans CJK SC', sans-serif;
}
body:lang(zh-hk, zh-mo, zh-tw) {
font-family: 'Noto Sans', 'Noto Sans CJK TC', sans-serif;
}
body:lang(ja) {
font-family: 'Noto Sans', 'Noto Sans CJK JP', sans-serif;
}
body:lang(ko) {
font-family: 'Noto Sans', 'Noto Sans CJK KR', sans-serif;
}