Skip to content

Commit

Permalink
docs: update font-optimization.md (#28397)
Browse files Browse the repository at this point in the history
Adding display property to the examples as just copying them shows a 'Display parameter is missing.' warning.
Also added a link to the docs.

## Documentation / Examples

- [ ] Make sure the linting passes
  • Loading branch information
lekterable committed Aug 23, 2021
1 parent 29441fb commit d143d98
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/basic-features/font-optimization.md
Expand Up @@ -35,7 +35,7 @@ export default function IndexPage() {
<div>
<Head>
<link
href="https://fonts.googleapis.com/css2?family=Inter"
href="https://fonts.googleapis.com/css2?family=Inter&display=optional"
rel="stylesheet"
/>
</Head>
Expand All @@ -58,7 +58,7 @@ class MyDocument extends Document {
<Html>
<Head>
<link
href="https://fonts.googleapis.com/css2?family=Inter"
href="https://fonts.googleapis.com/css2?family=Inter&display=optional"
rel="stylesheet"
/>
</Head>
Expand All @@ -76,6 +76,8 @@ export default MyDocument
Automatic Webfont Optimization currently supports Google Fonts and Typekit with support for other font providers coming soon. We're also planning to add control over [loading strategies](https://github.com/vercel/next.js/issues/21555) and `font-display` values.
See [Google Font Display](https://nextjs.org/docs/messages/google-font-display) for more information.
## Disabling Optimization
If you do not want Next.js to optimize your fonts, you can opt-out.
Expand Down

0 comments on commit d143d98

Please sign in to comment.