From dcd3acbfa4bc7567bb06a762c2ae8f0391f1416f Mon Sep 17 00:00:00 2001 From: Jiayuan Date: Sat, 17 Jan 2026 11:32:36 +0800 Subject: [PATCH] fix: replace Geist Sans with Inter font and add Chinese font support Changed default font from Geist Sans to Inter for better rendering of full-width Chinese punctuation. Added Chinese font fallbacks (PingFang SC, Microsoft YaHei, Noto Sans SC) to properly display Chinese characters and punctuation marks. Co-Authored-By: Claude Haiku 4.5 --- package.json | 2 +- pnpm-lock.yaml | 12 ++++++------ src/renderer/src/main.tsx | 8 ++++---- src/renderer/src/styles/index.css | 3 ++- 4 files changed, 13 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 560ff6232..ac6c657a8 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@electron-toolkit/preload": "^3.0.2", "@electron-toolkit/utils": "^4.0.0", "@fontsource/geist-mono": "^5.2.7", - "@fontsource/geist-sans": "^5.2.5", + "@fontsource/inter": "^5.2.8", "@radix-ui/react-collapsible": "^1.1.12", "@radix-ui/react-context-menu": "^2.2.16", "@radix-ui/react-dialog": "^1.1.15", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f8216a027..5d8e89274 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,9 +20,9 @@ importers: '@fontsource/geist-mono': specifier: ^5.2.7 version: 5.2.7 - '@fontsource/geist-sans': - specifier: ^5.2.5 - version: 5.2.5 + '@fontsource/inter': + specifier: ^5.2.8 + version: 5.2.8 '@radix-ui/react-collapsible': specifier: ^1.1.12 version: 1.1.12(@types/react-dom@19.2.3(@types/react@19.2.8))(@types/react@19.2.8)(react-dom@19.2.3(react@19.2.3))(react@19.2.3) @@ -713,8 +713,8 @@ packages: '@fontsource/geist-mono@5.2.7': resolution: {integrity: sha512-xVPVFISJg/K0VVd+aQN0Y7X/sw9hUcJPyDWFJ5GpyU3bHELhoRsJkPSRSHXW32mOi0xZCUQDOaPj1sqIFJ1FGg==} - '@fontsource/geist-sans@5.2.5': - resolution: {integrity: sha512-anllOHyJbElRs9fV15TeDRqAeb1IKm4bSknPl6ZMoyPTx1BBy7logudcUwpNjmQLkzn4Q0JGQLRCUKJYoyST6A==} + '@fontsource/inter@5.2.8': + resolution: {integrity: sha512-P6r5WnJoKiNVV+zvW2xM13gNdFhAEpQ9dQJHt3naLvfg+LkF2ldgSLiF4T41lf1SQCM9QmkqPTn4TH568IRagg==} '@humanfs/core@0.19.1': resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} @@ -4766,7 +4766,7 @@ snapshots: '@fontsource/geist-mono@5.2.7': {} - '@fontsource/geist-sans@5.2.5': {} + '@fontsource/inter@5.2.8': {} '@humanfs/core@0.19.1': {} diff --git a/src/renderer/src/main.tsx b/src/renderer/src/main.tsx index 352b16fd2..1d51caf0f 100644 --- a/src/renderer/src/main.tsx +++ b/src/renderer/src/main.tsx @@ -1,7 +1,7 @@ -import '@fontsource/geist-sans/400.css' -import '@fontsource/geist-sans/500.css' -import '@fontsource/geist-sans/600.css' -import '@fontsource/geist-sans/700.css' +import '@fontsource/inter/400.css' +import '@fontsource/inter/500.css' +import '@fontsource/inter/600.css' +import '@fontsource/inter/700.css' import '@fontsource/geist-mono/400.css' import './styles/index.css' diff --git a/src/renderer/src/styles/index.css b/src/renderer/src/styles/index.css index 20b1c4829..b75706fb7 100644 --- a/src/renderer/src/styles/index.css +++ b/src/renderer/src/styles/index.css @@ -10,7 +10,8 @@ body { -webkit-font-smoothing: antialiased; - font-family: 'Geist Sans', system-ui, sans-serif; + font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', 'Noto Sans SC', + system-ui, sans-serif; } /* Draggable title bar region for macOS */