adjustFontFallback is not working with Google Fonts in Next.js 15
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 142k
- Forks
- 32.4k
- Avg merge
- 2d 14h
- Merged PRs (30d)
- 351
Description
Link to the code that reproduces this issue
https://codesandbox.io/p/devbox/sweet-moon-yzv9yt
To Reproduce
- Import any font from fonts/google
- Set adjustFontFallback to false
- Apply className of font to body
- Check if font fallback is applied in the inspector
Current vs. Expected behavior
Current behavior: font fallback is always provided regardless of the adjustFontFallback value
Expected behavior: font fallback should only be applied when adjustFontFallback is true. When it's false it should not be applied
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 16272
Available CPU cores: 12
Binaries:
Node: 20.17.0
npm: 10.9.2
Yarn: N/A
pnpm: N/A
Relevant Packages:
next: 15.1.1-canary.1 // Latest available version is detected (15.1.1-canary.1).
eslint-config-next: N/A
react: 19.0.0
react-dom: 19.0.0
typescript: 5.7.2
Next.js Config:
output: N/A
Which area(s) are affected? (Select all that apply)
Font (next/font)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
adjustFontFallback is working correctly in Next.js 14. However, after updating and not touching the font import and config code, it's not working.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction and inspect the next/font Google Fonts usage of adjustFontFallback. Compare the behavior between Next.js 14 and the reported Next.js 15.1.1-canary.1 environment. Done means fallback styles appear only when adjustFontFallback is true, including in next dev.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, next.js, react
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100