Switch to system font stacks. Closes #850.

This commit is contained in:
Mike Cao 2021-11-20 15:54:45 -08:00
parent d780573572
commit 74b8b128ef
4 changed files with 24 additions and 40 deletions

View File

@ -13,24 +13,6 @@ export default function LanguageButton() {
saveLocale(value);
}
switch (locale) {
case 'zh-CN':
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-sc/chinese-simplified-400.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-sc/chinese-simplified-500.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-sc/chinese-simplified-700.css');
break;
case 'zh-TW':
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-tc/chinese-traditional-400.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-tc/chinese-traditional-500.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-tc/chinese-traditional-700.css');
break;
case 'ja-JP':
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-jp/japanese-400.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-jp/japanese-500.css');
import(/* webpackMode: "eager" */ '@fontsource/noto-sans-jp/japanese-700.css');
break;
}
return (
<MenuButton
icon={<Globe />}

View File

@ -57,9 +57,6 @@
},
"dependencies": {
"@fontsource/inter": "4.5.0",
"@fontsource/noto-sans-jp": "4.5.0",
"@fontsource/noto-sans-sc": "4.5.0",
"@fontsource/noto-sans-tc": "4.5.0",
"@prisma/client": "2.29.1",
"@reduxjs/toolkit": "^1.6.1",
"bcryptjs": "^2.4.3",

View File

@ -1,6 +1,8 @@
html,
body {
font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
font-family: Inter, -apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans,
Ubuntu, Cantrell, 'Helvetica Neue', sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji',
'Segoe UI Symbol';
font-weight: 400;
line-height: 1.8;
padding: 0;
@ -21,15 +23,33 @@ body {
}
.zh-CN {
font-family: 'Noto Sans SC', sans-serif !important;
font-family: '方体', 'PingFang SC', '黑体', 'Heiti SC', 'Microsoft JhengHei UI',
'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK SC', sans-serif !important;
}
.zh-TW {
font-family: 'Noto Sans TC', sans-serif !important;
font-family: '方體', 'PingFang TC', '黑體', 'Heiti TC', 'Microsoft JhengHei UI',
'Microsoft JhengHei', Roboto, Noto, 'Noto Sans CJK TC', sans-serif !important;
}
.ja-JP {
font-family: 'Noto Sans JP', sans-serif !important;
font-family: '游ゴシック体', YuGothic, 'ヒラギノ丸ゴ', 'Hiragino Sans', 'Yu Gothic UI',
'Meiryo UI', 'MS Gothic', Roboto, Noto, 'Noto Sans CJK JP', sans-serif !important;
}
.ko-KR {
font-family: 'Nanum Gothic', 'Apple SD Gothic Neo', 'Malgun Gothic', Roboto, Noto,
'Noto Sans CJK KR', sans-serif !important;
}
.ar-SA {
font-family: 'Geeza Pro', 'Arabic Typesetting', Roboto, Noto, 'Noto Naskh Arabic',
'Times New Roman', serif !important;
}
.he-IL {
font-family: 'New Peninim MT', 'Arial Hebrew', Gisha, 'Times New Roman', Roboto, Noto,
'Noto Sans Hebrew', sans-serif !important;
}
.he-IL {

View File

@ -1162,21 +1162,6 @@
resolved "https://registry.yarnpkg.com/@fontsource/inter/-/inter-4.5.0.tgz#b99e49fa178e4086250fb3df2ed6a7366c9a0cb5"
integrity sha512-2efK8Ru0LkuOYrEpiHPlV02YkTdIKGbezlxVNeA8/3c+tNt7P2aQPuiYYkVy7N4GA5LWSUVcLL/91MpCIjinOw==
"@fontsource/noto-sans-jp@4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@fontsource/noto-sans-jp/-/noto-sans-jp-4.5.0.tgz#e9dbc9e3ccf37931da37cf932e6ceea7e1146499"
integrity sha512-BXe+enzyvI+iWYk7vr1cus0tc1wq8D7t08T1O5PuCZALJEYOPD3Knpl4ShVb6a9MXxaS25CjBhmc+r46uqyvpw==
"@fontsource/noto-sans-sc@4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@fontsource/noto-sans-sc/-/noto-sans-sc-4.5.0.tgz#30d07b054788cc4a3f6a010cfdbd3726deeb8c37"
integrity sha512-pmK/cORHcu7oWLi6Waf6MXaAVyenfe8+mc5SqrA+mjZHPRsq/3j6C/hFFkCFG1wp5igFS8xd5Cz8L1elnSB/0A==
"@fontsource/noto-sans-tc@4.5.0":
version "4.5.0"
resolved "https://registry.yarnpkg.com/@fontsource/noto-sans-tc/-/noto-sans-tc-4.5.0.tgz#ea83a2c0851241464a9aea5facd9be7455b0f2dd"
integrity sha512-7z8aT4aY5EJ8gggfJhUhtXL/CZQQSZ+HBuhXxiHy+NkvZG2Jz+Aa1kxrsJivzroJuK9dySYN4Pd/GENJv5WFqA==
"@formatjs/cli@^4.2.29":
version "4.4.0"
resolved "https://registry.yarnpkg.com/@formatjs/cli/-/cli-4.4.0.tgz#e240f1a2caf31a59c148289d3a5cda6dc50f73ad"