-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NEXT-1192] Failed to find font override - next/font/google #47115
Comments
Having the same issue with |
Same issue with |
same issue with |
1 similar comment
same issue with |
Same with I basically followed the tailwind way of implementing it. I'm using the experimental |
May be unhelpful but I just update the import to |
Hi everybody! Adding " display: 'swap' " in options, helped me! |
Adding @font-face on my css fixed it for me:
|
Seem to be having the same issue with |
Me too. |
Same issue with Bruno Ace |
Another thing, I'm seeing that a lot of people including myself are having issues with Next new appdir in the different steps of developing an app. I would recommend that u don't use the app dir and use the common pages structure, I'm using v 13.4.1 that it's supposed to be stable and I'm breaking my head against the keyboad bc I can't get a font or a simple animation to work. |
Same issue with Comme |
Same with Texturina |
I've also been bashing my ahead against my keyboard, it's a real struggle after using the old system for so long 😅. Take this with a grain of salt as I've been very optimistic (and enthusiastic!) about this change for a while now, but:
In the mean time, you could wrap client-designed/legacy components in client component wrappers to have them work with the new system - I think the Next docs even talk about doing this (although I may be wrong). Also, still having this issue with |
For my case, I think the font just loads fine but it's just the error when building the app. I'm using the I am also using |
New Update! This behaviour is random and happens unexpectedly. It doesn't seem like I have it right now! I didn't made any change to the code. Screen.Recording.2023-05-30.at.15.55.58.mov |
cc @leerob - lots of struggle here |
+1 next font feature seems buggy 👎 - easier to go traditional? |
Thanks for the shout @shaun-scale! We'll take a look 🙏 |
Same same |
+1 for |
I have also noticed some weird bugs that are very hard to reproduce again but occurs often during development when using Next.js App Directory. |
I can confirm that this issue still persists and is there a fix coming soon? |
I can confirm this issue still persists and is there a new fix WIP? I would be super happy to work on this issue if no one's currently working on one :) |
Any update or expected timeline? |
Same issue for |
The issue got reintroduced in Next.js
|
@ProchaLu Are you able to reproduce reliably? May have been a stale A good reminder I should update the package again since a new version came out → https://github.com/seek-oss/capsize/releases. |
@samcx , here is a small repro for this issue in Next.js
|
@ProchaLu Ah I see. Yes, |
## Why? We need to be up-to-date with this package so our `next/font` is working optimally. → https://github.com/seek-oss/capsize/releases. Unlikely related to the latest [comment](#47115 (comment)), but a good reminder I need to check this regularly (or we should automate it, or have a better solution). Closes NEXT-2715
Same...I followed the documentation.
and
with no results |
|
In the end I have downloaded the font and am using it as I used to do... |
any solutions ? |
If you guys can provide simple |
Still not fixed for
Thank you |
@mwawrusch I think this particular one isn't supported yet. We use the package
|
Thanks - I added seek-oss/capsize#189 |
Pull request should be merged soon: seek-oss/capsize#192 . Appreciate all your work. |
## Why? Having the latest `@capsizecss/metrics` package allows us to have the latest font fallbacks when using [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts). - x-ref: #47115 (comment) - x-ref: #47115 (comment) - https://github.com/seek-oss/capsize/releases/tag/%40capsizecss%2Fmetrics%403.0.0 Closes NEXT-3123
@mwawrusch The addition for |
@mwawrusch It is on |
@samcx |
This comment has been minimized.
This comment has been minimized.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.2.5-canary.3 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
Font optimization (@next/font)
Link to the code that reproduces this issue
https://github.com/maxencerb/next-font-bug
To Reproduce
Describe the Bug
Output
Output works as expected
Console Output
Explaination
All fallback font metrics from google are loaded from
next/font/google/get-fallback-font-override-metrics.ts
where we can see the following method and doc :So I think there might be a fix but I don't really know how to implement it. I tried looking at the local font optimization code.
Maybe someone can either find the solution to calculate the values with fontkit or at least update the json file under
next/src/server/google-font-metrics.json
and tell how to find those values.Expected Behavior
Find the font fallback for any google font
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1192
The text was updated successfully, but these errors were encountered: