fix: Google Fonts css2 URL 400 Bad Request (Roboto weight syntax)#122
Merged
fix: Google Fonts css2 URL 400 Bad Request (Roboto weight syntax)#122
Conversation
The css2 endpoint rejects legacy v1 syntax (colon-separated weights), which returned 400 Bad Request. Use wght@300;400;500;700 for Roboto. Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- Remove unused Roboto and Share Tech from the Google Fonts bundle - Apply font CSS variables on Html; drop duplicate text-font stylesheet - Align MUI typography, globals.css, and app bar wordmark with shared stacks - Split fontVariables (theme-safe) from appFonts (next/font entry) Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
Turbopack requires explicit string literals for the font loader's `variable` option; imported constants fail the build. Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
_document is server-only; next/font side effects were not in the client bundle, so --font-app-* stayed undefined and body fell back to serif. Co-authored-by: Max Kayander <mkayander@users.noreply.github.com>
github-actions bot
pushed a commit
that referenced
this pull request
Apr 8, 2026
## [1.374.3](v1.374.2...v1.374.3) (2026-04-08) ### Bug Fixes * Google Fonts css2 URL 400 Bad Request (Roboto weight syntax) ([#122](#122)) ([a31b96b](a31b96b))
|
🎉 This PR is included in version 1.374.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The combined Google Fonts URL in
_document.tsxmixed CSS2 with legacy v1 syntax for Roboto, which returned 400 Bad Request.Changes
next/font; Roboto / unused Share Tech removed; Material Icons link kept.variableoptions inappFonts.tsmust be string literals.#/shared/fonts/appFontsfrompages/_app.tsx.pages/_document.tsxis server-only, so importingnext/fontonly there did not put@font-face/--font-app-*definitions in the client bundle —var(--font-app-sans)was invalid and the UI fell back to Times New Roman.Verification
pnpm run build— passpnpm test— pass (earlier)