feat: migrate to Astro's experimental font API

Replace @fontsource-variable NPM packages with Astro's built-in
experimental font API using the Fontsource provider. Fonts are now
fetched at build time, cached locally, and served with the site.

This provides automatic @font-face generation, preload link injection,
and metric-adjusted fallback fonts (size-adjust, ascent-override, etc.)
to reduce CLS during font loading.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-01 02:43:48 +00:00
parent e85a83c2c6
commit e5d2604edc
5 changed files with 119 additions and 70 deletions

View File

@@ -15,9 +15,6 @@
},
"dependencies": {
"@astrojs/sitemap": "^3.6.1",
"@fontsource-variable/bricolage-grotesque": "^5.2.10",
"@fontsource-variable/dm-sans": "^5.2.8",
"@fontsource-variable/jetbrains-mono": "^5.2.8",
"@iconify-json/heroicons": "^1.2.3",
"@iconify-json/simple-icons": "^1.2.65",
"astro": "^5.16.8",