diff --git a/packages/next/server/post-process.ts b/packages/next/server/post-process.ts index ca1ec000fa2da..126cdae8c9da5 100644 --- a/packages/next/server/post-process.ts +++ b/packages/next/server/post-process.ts @@ -135,9 +135,15 @@ class FontOptimizerMiddleware implements PostProcessMiddleware { result = result.replace('', `${fallBackLinkTag}`) } else { const nonceStr = nonce ? ` nonce="${nonce}"` : '' + let dataAttr = '' + + if (fontContent.includes('ascent-override')) { + dataAttr = ' data-size-adjust="true"' + } + result = result.replace( '', - `` + `` ) // Remove inert font tag