From 830ac3094b5f2c273b32b1ed173ba64e0bf29bcb Mon Sep 17 00:00:00 2001 From: Matthew L McPeak Date: Mon, 13 Jul 2026 09:15:45 -0400 Subject: [PATCH] fix: self-host fonts instead of depending on Google Fonts CDN Cinzel/IBM Plex Sans/IBM Plex Mono were loaded via a Google Fonts CDN @import, unchanged from the original PrimeVue-era CSS. Any environment without outbound network access (or that can't reach fonts.googleapis.com) silently fell back to a generic system sans-serif, which is what surfaced as "text still off" after the border/heading-font fixes. Switch to @fontsource's self-hosted packages so the font files ship as real build assets (26 woff2 files bundled) instead of a runtime network dependency. Co-Authored-By: Claude Sonnet 5 --- bun.lock | 9 +++++++++ packages/library/package.json | 3 +++ packages/library/src/assets/css/tailwind.css | 9 ++++++++- 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/bun.lock b/bun.lock index 6248fff..ec3cf47 100644 --- a/bun.lock +++ b/bun.lock @@ -36,6 +36,9 @@ "name": "@nychthemeron/library", "version": "0.1.0", "dependencies": { + "@fontsource/cinzel": "^5.2.8", + "@fontsource/ibm-plex-mono": "^5.2.7", + "@fontsource/ibm-plex-sans": "^5.2.8", "@lucide/vue": "^1.24.0", "@tailwindcss/vite": "^4.3.2", "@vueuse/core": "^14.3.0", @@ -258,6 +261,12 @@ "@floating-ui/vue": ["@floating-ui/vue@1.1.11", "", { "dependencies": { "@floating-ui/dom": "^1.7.6", "@floating-ui/utils": "^0.2.11", "vue-demi": ">=0.13.0" } }, "sha512-HzHKCNVxnGS35r9fCHBc3+uCnjw9IWIlCPL683cGgM9Kgj2BiAl8x1mS7vtvP6F9S/e/q4O6MApwSHj8hNLGfw=="], + "@fontsource/cinzel": ["@fontsource/cinzel@5.2.8", "", {}, "sha512-B9WeF/jPlOJOrcXfX96cy4KfM+s1QcU2C9W2hE3azBOBzPvzFkNpBovT5JmhAeicE/s4HZWKF9LF5hmEcqlbsw=="], + + "@fontsource/ibm-plex-mono": ["@fontsource/ibm-plex-mono@5.2.7", "", {}, "sha512-MKAb8qV+CaiMQn2B0dIi1OV3565NYzp3WN5b4oT6LTkk+F0jR6j0ZN+5BKJiIhffDC3rtBULsYZE65+0018z9w=="], + + "@fontsource/ibm-plex-sans": ["@fontsource/ibm-plex-sans@5.2.8", "", {}, "sha512-eztSXjDhPhcpxNIiGTgMebdLP9qS4rWkysuE1V7c+DjOR0qiezaiDaTwQE7bTnG5HxAY/8M43XKDvs3cYq6ZYQ=="], + "@hono/node-server": ["@hono/node-server@1.19.14", "", { "peerDependencies": { "hono": "^4" } }, "sha512-GwtvgtXxnWsucXvbQXkRgqksiH2Qed37H9xHZocE5sA3N8O8O8/8FA3uclQXxXVzc9XBZuEOMK7+r02FmSpHtw=="], "@humanfs/core": ["@humanfs/core@0.19.2", "", { "dependencies": { "@humanfs/types": "^0.15.0" } }, "sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA=="], diff --git a/packages/library/package.json b/packages/library/package.json index 39e6b0d..a527822 100644 --- a/packages/library/package.json +++ b/packages/library/package.json @@ -40,6 +40,9 @@ "vite-plugin-dts": "^5.0.2" }, "dependencies": { + "@fontsource/cinzel": "^5.2.8", + "@fontsource/ibm-plex-mono": "^5.2.7", + "@fontsource/ibm-plex-sans": "^5.2.8", "@lucide/vue": "^1.24.0", "@tailwindcss/vite": "^4.3.2", "@vueuse/core": "^14.3.0", diff --git a/packages/library/src/assets/css/tailwind.css b/packages/library/src/assets/css/tailwind.css index fc9c430..3e9902e 100644 --- a/packages/library/src/assets/css/tailwind.css +++ b/packages/library/src/assets/css/tailwind.css @@ -6,7 +6,14 @@ ============================================================ */ -@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@400;500&display=swap'); +/* Self-hosted fonts (not a Google Fonts CDN @import) so the library never + depends on outbound network access to render its own type. */ +@import "@fontsource/cinzel/400.css"; +@import "@fontsource/cinzel/600.css"; +@import "@fontsource/ibm-plex-sans/400.css"; +@import "@fontsource/ibm-plex-sans/500.css"; +@import "@fontsource/ibm-plex-mono/400.css"; +@import "@fontsource/ibm-plex-mono/500.css"; @import "tailwindcss"; @import "tw-animate-css";