vercel / geist-font

https://vercel.com/font
SIL Open Font License 1.1
2.13k stars 54 forks source link

Font is unsupported for Vercel og-image generation #91

Open robinsmith-source opened 4 months ago

robinsmith-source commented 4 months ago

Font Name (Geist Sans/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:

  1. Download Geist from Github release.
  2. Import the font into opengraph-image.tsx or icon.tsx inside a Next.js app.
  3. 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: Unsupported GDEF error Geist Mono Error: RangeError

Environment (please complete the following information):

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.