Link to the code that reproduces this issue
https://github.com/codayon/local-font-weight
To Reproduce
- npx create-next-app@canary
- create app/fonts.ts
- import localFont function and make an instance
- try adding multiple weights in array of strings
- face the issue
Current vs. Expected behavior
localFont instances doesn't have the permission to add multiple weights while google fonts do. localFont instances should also be able to add multiple fonts.
Provide environment information
Operating System:
Platform: win32
Arch: x64
Version: Windows 11 Pro
Available memory (MB): 16209
Available CPU cores: 16
Binaries:
Node: 25.9.0
npm: 11.12.1
Yarn: 1.22.22
pnpm: 10.33.0
Relevant Packages:
next: 16.2.1-canary.33 // Latest available version is detected (16.2.1-canary.33).
eslint-config-next: N/A
react: 19.2.5
react-dom: 19.2.5
typescript: 5.9.3
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
I tried using using patch-package, which fixes this issue, but I'm facing a few more issues with localFont, so I'm not sure if things are working as expected.
Reference: https://nextjs.org/docs/app/api-reference/components/font
Link to the code that reproduces this issue
https://github.com/codayon/local-font-weight
To Reproduce
Current vs. Expected behavior
localFont instances doesn't have the permission to add multiple weights while google fonts do. localFont instances should also be able to add multiple fonts.
Provide environment information
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
I tried using using patch-package, which fixes this issue, but I'm facing a few more issues with localFont, so I'm not sure if things are working as expected.
Reference: https://nextjs.org/docs/app/api-reference/components/font