vercel/next.js

adjustFontFallback is not working with Google Fonts in Next.js 15

evheniydan opened this issue · 0 comments

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/sweet-moon-yzv9yt

To Reproduce

  1. Import any font from fonts/google
  2. Set adjustFontFallback to false
  3. Apply className of font to body
  4. 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.