Repository navigation
Load fonts from the repo instead of Google Fonts at build time - #1185
Merged
Merged
Conversation
next/font/google downloads Geist and Geist Mono during next build, and a failed fetch kills the build (frontend CI and Docker build jobs). Commit the variable woff2 files of the vercel/geist-font v1.8.1 release with their OFL licence and load them with next/font/local. Weight ranges, display and the --font-geist-* variables are unchanged, and unicode-range matches the subsets Google served so rendering stays the same.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
next/font/googlefetches Geist and Geist Mono from Google Fonts duringnext build. When that fetch fails the build stops with "Can't resolve '@vercel/turbopack-next/internal/font/google/font'", which broke the Frontend and Docker build jobs a few times on 19 and 20 Oct (#1150, #1179, main).This commits the fonts and loads them with
next/font/local:packages/frontend/src/fonts/geist/:Geist-Variable.woff2(69 KB) andGeistMono-Variable.woff2(71 KB) from the vercel/geist-font v1.8.1 release, plusOFL.txt.--font-geist-sans/--font-geist-monovariables, weights (400-700 sans, 400-500 mono),display: swapand Arial-based fallback.unicode-rangeis the union of the subsets Google served, so characters Google didn't cover (arrows, for example) still fall back to the system font like today.packages/frontend/.Checked:
next buildpasses with every proxy pointed at a dead port; main fails the same way CI does under that setup.Small differences: the mono family is now called
GeistMono(the local loader names the family after the constant), and the preloaded files are the full variable fonts (69 + 71 KB instead of 29 + 23 KB for the latin slices).