Skip to content

Comments

Self-host Google Fonts to eliminate direct googleapis.com dependency#25

Open
Copilot wants to merge 3 commits intomasterfrom
copilot/add-google-fonts-loading
Open

Self-host Google Fonts to eliminate direct googleapis.com dependency#25
Copilot wants to merge 3 commits intomasterfrom
copilot/add-google-fonts-loading

Conversation

Copy link

Copilot AI commented Feb 10, 2026

Remove direct dependency on fonts.googleapis.com by self-hosting Inter, Inter_Tight, and Roboto_Mono fonts previously loaded via next/font/google.

Changes

  • Font files: Added woff2 files to apps/web/src/fonts/

    • Inter 400 Latin (24KB)
    • Inter Tight 400 Latin (22KB)
    • Roboto Mono variable 100-700 (33KB)
  • Layout: Converted Google Font imports to localFont in apps/web/app/layout.tsx

- import { Inter, Inter_Tight, Roboto_Mono } from 'next/font/google';
+ import localFont from 'next/font/local';

- const inter = Inter({
-   variable: '--font-inter',
-   weight: ['400'],
-   subsets: ['latin'],
- });
+ const inter = localFont({
+   src: '../src/fonts/inter-400-latin.woff2',
+   variable: '--font-inter',
+   weight: '400',
+   display: 'swap',
+ });

Limitation

OnchainKit (v0.38.6) loads its own Google Fonts via CSS imports. CSP headers allowing fonts.googleapis.com remain unchanged for library compatibility.

Screenshot

Homepage rendering with self-hosted fonts

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • 192.168.133.7
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --require ./tracer/initialize.js ./node_modules/.bin/next dev (packet block)
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node --require ./tracer/initialize.js /home/REDACTED/work/web/web/apps/web/node_modules/next/dist/server/lib/start-server.js (packet block)
  • boards-api.greenhouse.io
    • Triggering command: /opt/hostedtoolcache/node/24.13.0/x64/bin/node /opt/hostedtoolcache/node/24.13.0/x64/bin/node /home/REDACTED/work/web/web/apps/web/node_modules/next/dist/compiled/jest-worker/processChild.js (dns block)
  • fonts.gstatic.com
    • Triggering command: /usr/bin/curl curl -L REDACTED -o inter-400.woff2 (dns block)
    • Triggering command: /usr/bin/curl curl -L REDACTED -o inter-tight-400.woff2 (dns block)
    • Triggering command: /usr/bin/curl curl -L REDACTED -o roboto-mono-400.woff2 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

fonts.googleapis.com


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits February 10, 2026 13:47
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Co-authored-by: Kushmanmb <193178375+Kushmanmb@users.noreply.github.com>
Copilot AI changed the title [WIP] Add loading for Google Fonts Self-host Google Fonts to eliminate direct googleapis.com dependency Feb 10, 2026
@Kushmanmb Yaketh (Kushmanmb) marked this pull request as ready for review February 10, 2026 14:16
@Kushmanmb
Copy link
Member

git@github.com:kushmanmb-org/web.git

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