Unverified Commit 6e3af1b0 authored by Delba de Oliveira's avatar Delba de Oliveira Committed by GitHub
parent 67aa0d67
......@@ -90,11 +90,11 @@ The behavior of [`next/script`](/docs/app/api-reference/components/script) has b
### Font Optimization
Previously, Next.js helped you optimize fonts by [inlining font CSS](/docs/app/building-your-application/optimizing/fonts). Version 13 introduces the new [`next/font`](/docs/app/building-your-application/optimizing/fonts) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy. `next/font` is supported in both the `pages` and `app` directories.
Previously, Next.js helped you optimize fonts by [inlining font CSS](/docs/app/api-reference/components/font). Version 13 introduces the new [`next/font`](/docs/app/api-reference/components/font) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy. `next/font` is supported in both the `pages` and `app` directories.
While [inlining CSS](/docs/app/building-your-application/optimizing/fonts) still works in `pages`, it does not work in `app`. You should use [`next/font`](/docs/app/building-your-application/optimizing/fonts) instead.
While [inlining CSS](/docs/app/api-reference/components/font) still works in `pages`, it does not work in `app`. You should use [`next/font`](/docs/app/api-reference/components/font) instead.
See the [Font Optimization](/docs/app/building-your-application/optimizing/fonts) page to learn how to use `next/font`.
See the [Font Optimization](/docs/app/api-reference/components/font) page to learn how to use `next/font`.
## Migrating from `pages` to `app`
......
......@@ -43,7 +43,7 @@ Depending on your needs, Next.js allows you to choose your data fetching strateg
### Built-in Optimizations
[Images](/docs/app/building-your-application/optimizing/images), [fonts](/docs/app/building-your-application/optimizing/fonts), and [third-party scripts](/docs/app/guides/scripts) often have a large impact on an application’s performance. Next.js includes specialized components and APIs that automatically optimize them for you.
[Images](/docs/app/building-your-application/optimizing/images), [fonts](/docs/app/api-reference/components/font), and [third-party scripts](/docs/app/guides/scripts) often have a large impact on an application’s performance. Next.js includes specialized components and APIs that automatically optimize them for you.
## Migration Steps
......@@ -574,7 +574,7 @@ If everything worked, you now have a functioning Next.js application running as
- [Streaming server rendering](/docs/app/building-your-application/routing/loading-ui-and-streaming)
- [React Server Components](/docs/app/building-your-application/rendering/server-components)
- **Optimize images** with the [`<Image>` component](/docs/app/building-your-application/optimizing/images)
- **Optimize fonts** with [`next/font`](/docs/app/building-your-application/optimizing/fonts)
- **Optimize fonts** with [`next/font`](/docs/app/api-reference/components/font)
- **Optimize third-party scripts** with the [`<Script>` component](/docs/app/guides/scripts)
- **Enable ESLint** with Next.js recommended rules by running `npx next lint` and configuring it to match your project’s needs
......
......@@ -43,7 +43,7 @@ Depending on your needs, Next.js allows you to choose your data fetching strateg
### Built-in Optimizations
[Images](/docs/app/building-your-application/optimizing/images), [fonts](/docs/app/building-your-application/optimizing/fonts), and [third-party scripts](/docs/app/guides/scripts) often have significant impact on an application's performance. Next.js comes with built-in components that automatically optimize those for you.
[Images](/docs/app/building-your-application/optimizing/images), [fonts](/docs/app/api-reference/components/font), and [third-party scripts](/docs/app/guides/scripts) often have significant impact on an application's performance. Next.js comes with built-in components that automatically optimize those for you.
## Migration Steps
......@@ -597,6 +597,6 @@ do next:
- [Streaming Server-Rendering](/docs/app/building-your-application/routing/loading-ui-and-streaming)
- [React Server Components](/docs/app/building-your-application/rendering/server-components)
- [Optimize images with the `<Image>` component](/docs/app/building-your-application/optimizing/images)
- [Optimize fonts with `next/font`](/docs/app/building-your-application/optimizing/fonts)
- [Optimize fonts with `next/font`](/docs/app/api-reference/components/font)
- [Optimize third-party scripts with the `<Script>` component](/docs/app/guides/scripts)
- [Update your ESLint configuration to support Next.js rules](/docs/app/api-reference/config/eslint)
......@@ -87,7 +87,7 @@ While building your application, we recommend using the following features to en
</AppOnly>
- **[Font Module](/docs/app/building-your-application/optimizing/fonts):** Optimize fonts by using the Font Module, which automatically hosts your font files with other static assets, removes external network requests, and reduces [layout shift](https://web.dev/articles/cls).
- **[Font Module](/docs/app/api-reference/components/font):** Optimize fonts by using the Font Module, which automatically hosts your font files with other static assets, removes external network requests, and reduces [layout shift](https://web.dev/articles/cls).
- **[`<Image>` Component](/docs/app/building-your-application/optimizing/images):** Optimize images by using the Image Component, which automatically optimizes images, prevents layout shift, and serves them in modern formats like WebP.
- **[`<Script>` Component](/docs/app/guides/scripts):** Optimize third-party scripts by using the Script Component, which automatically defers scripts and prevents them from blocking the main thread.
- **[ESLint](/docs/architecture/accessibility#linting):** Use the built-in `eslint-plugin-jsx-a11y` plugin to catch accessibility issues early.
......
......@@ -91,7 +91,7 @@ module.exports = createJestConfig(config)
Under the hood, `next/jest` is automatically configuring Jest for you, including:
- Setting up `transform` using the [Next.js Compiler](/docs/architecture/nextjs-compiler).
- Auto mocking stylesheets (`.css`, `.module.css`, and their scss variants), image imports and [`next/font`](/docs/app/building-your-application/optimizing/fonts).
- Auto mocking stylesheets (`.css`, `.module.css`, and their scss variants), image imports and [`next/font`](/docs/app/api-reference/components/font).
- Loading `.env` (and all variants) into `process.env`.
- Ignoring `node_modules` from test resolving and transforms.
- Ignoring `.next` from test resolving.
......
......@@ -83,6 +83,6 @@ The behavior of [`next/script`](/docs/pages/api-reference/components/script) has
### Font Optimization
Previously, Next.js helped you optimize fonts by inlining font CSS. Version 13 introduces the new [`next/font`](/docs/pages/building-your-application/optimizing/fonts) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy.
Previously, Next.js helped you optimize fonts by inlining font CSS. Version 13 introduces the new [`next/font`](/docs/pages/api-reference/components/font) module which gives you the ability to customize your font loading experience while still ensuring great performance and privacy.
See [Optimizing Fonts](/docs/pages/building-your-application/optimizing/fonts) to learn how to use `next/font`.
See [Optimizing Fonts](/docs/pages/api-reference/components/font) to learn how to use `next/font`.
---
title: Font Optimization
nav_title: Fonts
description: Optimize your application's web fonts with the built-in `next/font` loaders.
source: 'app/building-your-application/optimizing/fonts'
---
{/* DO NOT EDIT. The content of this doc is generated from the source above. To edit the content of this page, navigate to the source page in your editor. You can use the `<PagesOnly>Content</PagesOnly>` component to add content that is specific to the Pages Router. Any shared content should not be wrapped in a component. */}
......@@ -22,4 +22,4 @@ npx @next/codemod built-in-next-font .
## Useful Links
- [Codemods](/docs/app/guides/upgrading/codemods) - Understand more about codemods and how they can help automate large-scale codebase refactors.
- [Optimizing Fonts](/docs/app/building-your-application/optimizing/fonts) - Learn how to optimize fonts in your Next.js applications for improved performance.
- [Optimizing Fonts](/docs/app/api-reference/components/font) - Learn how to optimize fonts in your Next.js applications for improved performance.
......@@ -24,4 +24,4 @@ Add `rel="preconnect"` to the Google Font domain `<link>` tag:
- [Preconnect to required origins](https://web.dev/uses-rel-preconnect/)
- [Preconnect and dns-prefetch](https://web.dev/preconnect-and-dns-prefetch/#resolve-domain-name-early-with-reldns-prefetch)
- [Next.js Font Optimization](/docs/pages/building-your-application/optimizing/fonts)
- [Next.js Font Optimization](/docs/pages/api-reference/components/font)
......@@ -29,4 +29,4 @@ const notoSansJapanese = Noto_Sans_JP({
## Useful Links
- [Specifying a subset](/docs/pages/building-your-application/optimizing/fonts#specifying-a-subset)
- [Specifying a subset](/docs/pages/api-reference/components/font#specifying-a-subset)
......@@ -68,4 +68,4 @@ If you have a reason to only load a font for a particular page or don't care abo
## Useful Links
- [Custom Document](/docs/pages/building-your-application/routing/custom-document)
- [Font Optimization](/docs/pages/building-your-application/optimizing/fonts)
- [Font Optimization](/docs/pages/api-reference/components/font)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment