Font is unsupported for Vercel og-image generation
Font Name (Geist Sans/Geist Mono):
- [X] Geist Sans
- [x] Geist Mono
Description of the Issue:
I'm using a Next.js 14 App inside a Turborepo. When importing the Geist Sans font from the public folder into src/app/opengraph-image.tsx or src/app/icon.tsx and deploying it on Vercel, I encounter the unsupported GDEF error, as shown below. When importing the Geist Mono font, I get a RangeError, also depicted below.
I managed to resolve the issue by downloading the Geist font from an external source, which likely doesn't cause these errors. Additionally, in my development environment, the font loads perfectly fine.
Steps to Reproduce:
- Download Geist from Github release.
- Import the font into
opengraph-image.tsxoricon.tsxinside a Next.js app. - Deploy the Next.js app on Vercel.
Expected Behavior: The font from the original source should work seamlessly with all Vercel services.
Screenshots:
Geist Sans Error:
Geist Mono Error:
Environment (please complete the following information):
- OS: Windows 11
- Software: Next.js, Vercel, Turborepo
- Version of the Font: 1.1
Additional Context: I also attempted to use nearly all different font types and file extensions provided inside the zip, but none of them resolved the issue.
Latest compatible release 1.3