From a7caee1186a50b0a24c7eb5dae438f607f98bb40 Mon Sep 17 00:00:00 2001 From: chengyongru <2755839590@qq.com> Date: Mon, 20 Apr 2026 00:03:38 +0800 Subject: [PATCH] style(webui): improve typography with Apple-inspired font stack and CJK support - Add explicit CJK fonts (PingFang SC, Noto Sans SC, Microsoft YaHei) and programmer fonts (JetBrains Mono, Fira Code, Cascadia Code) to Tailwind config - Bump prose base size from prose-sm (14px) to prose-lg (18px) for sharper CJK rendering - Unify user/assistant message font size at 18px with CJK-aware line-height (1.8) - Replace pure black/white foreground with Apple-style warm grays (#1d1d1f / #f5f5f7) - Override Tailwind Typography colors to use design tokens for consistency - Add negative letter-spacing on headings for tighter, more polished look --- webui/index.html | 6 ++- webui/src/components/MarkdownTextRenderer.tsx | 9 ++-- webui/src/components/MessageBubble.tsx | 4 +- webui/src/globals.css | 46 +++++++++++++------ webui/tailwind.config.js | 28 +++++++++++ 5 files changed, 72 insertions(+), 21 deletions(-) diff --git a/webui/index.html b/webui/index.html index 24b775ccb..92fb88c1b 100644 --- a/webui/index.html +++ b/webui/index.html @@ -26,8 +26,10 @@ background: #ffffff; color: #0a0a0a; font-family: - ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", - Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif; + system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, + "Helvetica Neue", Arial, "Noto Sans", "Noto Sans SC", + "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", + sans-serif; } html.dark body { diff --git a/webui/src/components/MarkdownTextRenderer.tsx b/webui/src/components/MarkdownTextRenderer.tsx index fce32a982..fe9ab40ed 100644 --- a/webui/src/components/MarkdownTextRenderer.tsx +++ b/webui/src/components/MarkdownTextRenderer.tsx @@ -24,10 +24,10 @@ export default function MarkdownTextRenderer({ return (