From 4e3efa3814fe85ea7c67b9b333672108433b4eec Mon Sep 17 00:00:00 2001 From: Psychotoxical Date: Thu, 9 Apr 2026 13:23:00 +0200 Subject: [PATCH] feat: self-host fonts via @fontsource-variable, remove Google Fonts CDN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Replaces all Google Fonts CDN references (index.html preconnect/stylesheet and theme.css @import) with local @fontsource-variable npm packages. All 10 UI fonts now bundle as WOFF2 into dist/assets/ — app renders correctly without any internet connection. Co-Authored-By: Claude Sonnet 4.6 --- index.html | 3 -- package-lock.json | 104 ++++++++++++++++++++++++++++++++++++++++++- package.json | 10 +++++ src/styles/theme.css | 17 ++++++- 4 files changed, 128 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index d2bfde67..8e5a8e26 100644 --- a/index.html +++ b/index.html @@ -6,9 +6,6 @@ Psysonic - - -
diff --git a/package-lock.json b/package-lock.json index 9c1083d5..32e747e6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,23 @@ { "name": "psysonic", - "version": "1.34.2", + "version": "1.34.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "psysonic", - "version": "1.34.2", + "version": "1.34.6", "dependencies": { + "@fontsource-variable/dm-sans": "^5.2.8", + "@fontsource-variable/figtree": "^5.2.10", + "@fontsource-variable/inter": "^5.2.8", + "@fontsource-variable/lexend": "^5.2.11", + "@fontsource-variable/manrope": "^5.2.8", + "@fontsource-variable/nunito": "^5.2.7", + "@fontsource-variable/outfit": "^5.2.8", + "@fontsource-variable/plus-jakarta-sans": "^5.2.8", + "@fontsource-variable/rubik": "^5.2.8", + "@fontsource-variable/space-grotesk": "^5.2.10", "@tanstack/react-virtual": "^3.13.23", "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.6.0", @@ -773,6 +783,96 @@ "node": ">=18" } }, + "node_modules/@fontsource-variable/dm-sans": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/dm-sans/-/dm-sans-5.2.8.tgz", + "integrity": "sha512-AxkvMTvNWgfrmlyjiV05vlHYJa+nRQCf1EfvIrQAPBpFJW0O9VTz7oAFr9S3lvbWdmnFoBk7yFqQL86u64nl2g==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/figtree": { + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/@fontsource-variable/figtree/-/figtree-5.2.10.tgz", + "integrity": "sha512-a5Gumbpy3mdd+Yg31g6Qb7CmjYbrfyutJa3bWfP5q8A4GclIOwX7mI+ZuSHsJnw/mHvW6r9oh1AHJcJTIxK4JA==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/inter": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/inter/-/inter-5.2.8.tgz", + "integrity": "sha512-kOfP2D+ykbcX/P3IFnokOhVRNoTozo5/JxhAIVYLpea/UBmCQ/YWPBfWIDuBImXX/15KH+eKh4xpEUyS2sQQGQ==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/lexend": { + "version": "5.2.11", + "resolved": "https://registry.npmjs.org/@fontsource-variable/lexend/-/lexend-5.2.11.tgz", + "integrity": "sha512-0hgEQ4O7Nh8fxL/WWmspJf0BErbocRkZwtLRGey/V4mUUqxfF7QUwqhcdzwpjom3NYCniY4uzQ5wYD7r9/92tQ==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/manrope": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/manrope/-/manrope-5.2.8.tgz", + "integrity": "sha512-nc9lOuCRz73UHnovDE2bwXUdghE2SEOc7Aii0qGe3CLyE03W1a7VnY5Z6euRiapiKbCkGS+eXbY3s/kvWeGeSw==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/nunito": { + "version": "5.2.7", + "resolved": "https://registry.npmjs.org/@fontsource-variable/nunito/-/nunito-5.2.7.tgz", + "integrity": "sha512-2N8QhatkyKgSUbAGZO2FYLioxA32+RyI1EplVLawbpkGjUeui9Qg9VMrpkCaik1ydjFjfLV+kzQ0cGEsMrMenQ==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/outfit": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/outfit/-/outfit-5.2.8.tgz", + "integrity": "sha512-4oUDCZx/Tcz6HZP423w/niqEH31Gks5IsqHV2ZZz1qKHaVIZdj2f0/S1IK2n8jl6Xo0o3N+3RjNHlV9R73ozQA==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/plus-jakarta-sans": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/plus-jakarta-sans/-/plus-jakarta-sans-5.2.8.tgz", + "integrity": "sha512-iQecBizIdZxezODNHzOn4SvvRMrZL/S8k4MEXGDynCmUrImVW0VmX+tIAMqnADwH4haXlHSXqMgU6+kcfBQJdw==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/rubik": { + "version": "5.2.8", + "resolved": "https://registry.npmjs.org/@fontsource-variable/rubik/-/rubik-5.2.8.tgz", + "integrity": "sha512-vGDExLzB4a2Fj9mca5LqNoA2ZKcU9o+x5FEBLte/nxYkCB9hOQwZS6ZlItUv+Ssn7YMzKauGuI/Po+YueFuZbg==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, + "node_modules/@fontsource-variable/space-grotesk": { + "version": "5.2.10", + "resolved": "https://registry.npmjs.org/@fontsource-variable/space-grotesk/-/space-grotesk-5.2.10.tgz", + "integrity": "sha512-yJQO/o35/hAP3CFnpdFTwQku2yzJOae2HIpBmqkOVoxhhXJaQP3g+b6Jrz7u+eI7A5ZdCIf88uMWpBJdFiGr5w==", + "license": "OFL-1.1", + "funding": { + "url": "https://github.com/sponsors/ayuhito" + } + }, "node_modules/@jridgewell/gen-mapping": { "version": "0.3.13", "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", diff --git a/package.json b/package.json index 7879fb22..f6cee8f2 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,16 @@ "test": "vitest run" }, "dependencies": { + "@fontsource-variable/dm-sans": "^5.2.8", + "@fontsource-variable/figtree": "^5.2.10", + "@fontsource-variable/inter": "^5.2.8", + "@fontsource-variable/lexend": "^5.2.11", + "@fontsource-variable/manrope": "^5.2.8", + "@fontsource-variable/nunito": "^5.2.7", + "@fontsource-variable/outfit": "^5.2.8", + "@fontsource-variable/plus-jakarta-sans": "^5.2.8", + "@fontsource-variable/rubik": "^5.2.8", + "@fontsource-variable/space-grotesk": "^5.2.10", "@tanstack/react-virtual": "^3.13.23", "@tauri-apps/api": "^2", "@tauri-apps/plugin-dialog": "^2.6.0", diff --git a/src/styles/theme.css b/src/styles/theme.css index 5319ad7b..1d3be17c 100644 --- a/src/styles/theme.css +++ b/src/styles/theme.css @@ -3,7 +3,22 @@ Catppuccin Mocha Color Palette + Inter Typography ───────────────────────────────────────────────────────────── */ -@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&family=Space+Grotesk:wght@400;500;600;700&family=Outfit:wght@300..700&family=DM+Sans:ital,opsz,wght@0,9..40,300..700;1,9..40,300..700&family=Nunito:ital,wght@0,300..800;1,300..800&family=Rubik:ital,wght@0,300..700;1,300..700&family=Figtree:ital,wght@0,300..800;1,300..800&family=Manrope:wght@300..800&family=Plus+Jakarta+Sans:ital,wght@0,300..800;1,300..800&family=Lexend:wght@300..700&display=swap'); +@import '@fontsource-variable/inter'; +@import '@fontsource-variable/inter/wght-italic.css'; +@import '@fontsource-variable/space-grotesk'; +@import '@fontsource-variable/outfit'; +@import '@fontsource-variable/dm-sans'; +@import '@fontsource-variable/dm-sans/wght-italic.css'; +@import '@fontsource-variable/nunito'; +@import '@fontsource-variable/nunito/wght-italic.css'; +@import '@fontsource-variable/rubik'; +@import '@fontsource-variable/rubik/wght-italic.css'; +@import '@fontsource-variable/figtree'; +@import '@fontsource-variable/figtree/wght-italic.css'; +@import '@fontsource-variable/manrope'; +@import '@fontsource-variable/plus-jakarta-sans'; +@import '@fontsource-variable/plus-jakarta-sans/wght-italic.css'; +@import '@fontsource-variable/lexend'; /* ─── Catppuccin Mocha Variables ─── */ :root,