Skip to content

perf: remove Google Fonts dependency to improve loading speed#234

Merged
Thomas-Eliot merged 1 commit intohigress-group:mainfrom
lexburner:fix/remove-google-fonts
Apr 1, 2026
Merged

perf: remove Google Fonts dependency to improve loading speed#234
Thomas-Eliot merged 1 commit intohigress-group:mainfrom
lexburner:fix/remove-google-fonts

Conversation

@lexburner
Copy link
Copy Markdown
Contributor

📝 Description

移除开发者门户对 Google Fonts(DM Sans、Noto Sans SC)的外部依赖,回退到系统字体栈,提升页面加载速度。

  • 删除 index.html 中对 fonts.googleapis.comfonts.gstatic.com 的 preconnect 和字体样式表引用
  • index.cssfont-family'DM Sans', 'Noto Sans SC', ... 改为 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif

优势:

  • 消除对外部 CDN 的依赖,减少 DNS 查询和网络请求
  • 在网络受限环境(如中国大陆)下显著提升首屏加载速度
  • 使用系统原生字体,渲染更快且与操作系统风格一致

🔗 Related Issues

✅ Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Code refactoring (no functional changes)
  • Performance improvement
  • Build/CI configuration change
  • Other (please describe):

🧪 Testing

  • Manual testing completed
  • All tests pass locally

📋 Checklist

  • Code has been formatted (mvn spotless:apply for backend, npm run lint:fix for frontend)
  • Code is self-reviewed
  • No breaking changes (or migration guide provided)

📚 Additional Notes

此变更仅影响开发者门户前端(himarket-web/himarket-frontend/),不涉及后端或管理门户。

Google Fonts (DM Sans, Noto Sans SC) loaded from fonts.googleapis.com
causes significant page load delays, especially for users in China where
Google services are blocked or slow. Fall back to system font stack.

🤖 Generated with [Qoder][https://qoder.com]
Copy link
Copy Markdown
Collaborator

@Thomas-Eliot Thomas-Eliot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Thomas-Eliot Thomas-Eliot merged commit 672e7ae into higress-group:main Apr 1, 2026
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants