"Unsupported OpenType signature wOF2" when loading Inter in opengraph-image #63935
Labels
bug
Issue was opened via the bug report template.
Font (next/font)
Related to Next.js Font Optimization.
Link to the code that reproduces this issue
codesandbox
To Reproduce
Current vs. Expected behavior
The example gives a ttf file but opentype supports woff2 and it's also the default for the web so it should work.
This also works fine with Inter v3 .woff files but not .woff2 - if woff2 is not supported, this will be worth mentioning in the docs because the error message product by this issue is somehow a very low-level stack trace with no actionable information:
"Unsupported OpenType signature wOF2" maybe could be interpreted this way but honestly, the stack trace is useless and hides the error. What would be better is a simple "Error: woff2 files are not supported", no need for webpack-internal/node modules lines of code I'll never look at or understand.
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.1.0: Mon Oct 9 21:32:11 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6030 Binaries: Node: 21.2.0 npm: 10.2.3 Yarn: 1.22.21 pnpm: 8.10.5 Relevant Packages: next: 14.1.4 eslint-config-next: 14.1.4 react: 18.2.0 react-dom: 18.2.0 typescript: 5.4.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
Not sure, Font optimization (next/font)
Which stage(s) are affected? (Select all that apply)
next dev (local)
Additional context
I've also tried latest canary - still a problem.
The text was updated successfully, but these errors were encountered: