From eb432a49edf2d883795f4092ed13a15b98314454 Mon Sep 17 00:00:00 2001 From: yangjianbo Date: Fri, 16 Jan 2026 19:49:33 +0800 Subject: [PATCH] =?UTF-8?q?perf(=E5=89=8D=E7=AB=AF):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=20Google=20Fonts=20=E6=94=B9=E7=94=A8=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=AD=97=E4=BD=93=E6=A0=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 删除 Google Fonts @import,解决国内访问阻塞问题 - 使用 system-ui 优先的系统字体栈 - 添加中文字体支持(苹方、冬青黑、微软雅黑) - 移除 Inter 字体专用的 font-feature-settings 此改动可显著提升国内用户的页面加载速度,避免因 Google Fonts 被墙导致的渲染阻塞问题。 Co-Authored-By: Claude Opus 4.5 --- frontend/src/style.css | 3 --- frontend/tailwind.config.js | 7 +++++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/style.css b/frontend/src/style.css index 81a40e0c..16494f35 100644 --- a/frontend/src/style.css +++ b/frontend/src/style.css @@ -1,5 +1,3 @@ -@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); - @tailwind base; @tailwind components; @tailwind utilities; @@ -11,7 +9,6 @@ html { @apply scroll-smooth antialiased; - font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11'; } body { diff --git a/frontend/tailwind.config.js b/frontend/tailwind.config.js index 6d121d78..70e3a7ed 100644 --- a/frontend/tailwind.config.js +++ b/frontend/tailwind.config.js @@ -50,16 +50,19 @@ export default { }, fontFamily: { sans: [ - 'Inter', + 'system-ui', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica Neue', 'Arial', + 'PingFang SC', + 'Hiragino Sans GB', + 'Microsoft YaHei', 'sans-serif' ], - mono: ['JetBrains Mono', 'Fira Code', 'Monaco', 'Consolas', 'monospace'] + mono: ['ui-monospace', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'monospace'] }, boxShadow: { glass: '0 8px 32px rgba(0, 0, 0, 0.08)',