The current Next.js Font Optimization docs and the @next/font API Reference describe how to bring in Google Fonts as well as local font files, but the best practice for bringing in Typekit / Adobe Fonts is not described.
What is the best way to use Typekit / Adobe Fonts so that Next.js optimizations are applied?
@next/fonthas no support for Typekit yet and there isn't any related issue open on their GitHub repo (probably due to legal restrictions imposed by Typekit itself).However, this doesn't mean that you cannot use Typekit fonts with Next.js. Prior to Next.js 13, it had a feature called automatic font optimization which still exists, and supports Typekit (added in
vercel/next.js#24834).It will basically inline your font CSS. So, if you have:
Then Next.js will generate your documents having some content like this in
head(saves a request to Typekit):Here is the integration suite, you can check it out for different ways to add that stylesheet link: https://github.com/vercel/next.js/tree/canary/test/integration/font-optimization/fixtures/with-typekit (some of those methods are deprecated and will give you warnings).