Skip to content
Discussion options

You must be logged in to vote

The most likely fix is that the app still tries to load the Google hosted font somewhere. Remove any next font google import and any link tag to fonts.googleapis.com, then use a local font with next font local so the build and runtime never go online. To confirm it worked, reload with devtools open and check the network tab shows no requests to fonts.googleapis.com and that your woff2 files load from local paths.

I have coded an example for you

import type { Metadata } from "next"
import localFont from "next/font/local"
import "./globals.css"

const openSans = localFont({
  src: [
    { path: "./fonts/OpenSans-Regular.woff2", weight: "400", style: "normal" },
    { path: "./fonts/OpenSans…

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@Fred638
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@Fred638
Comment options

@Fred638
Comment options

Answer selected by Fred638
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Question Ask and answer questions about GitHub features and usage Programming Help Discussions around programming languages, open source and software development
3 participants