mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
6e3af1b0fe
Closes: https://linear.app/vercel/issue/DOC-4641/fonts Redirects: https://github.com/vercel/front/pull/45242
33 lines
830 B
Plaintext
33 lines
830 B
Plaintext
---
|
|
title: 'Missing specified subset for a `next/font/google` font'
|
|
---
|
|
|
|
## Why This Error Occurred
|
|
|
|
Preload is enabled for a font that is missing a specified subset.
|
|
|
|
## Possible Ways to Fix It
|
|
|
|
### Specify which subsets to preload for that font.
|
|
|
|
```js filename="example.js"
|
|
const inter = Inter({ subsets: ['latin'] })
|
|
```
|
|
|
|
> **Note**: previously it was possible to specify default subsets in your `next.config.js` with the `experimental.fontLoaders` option, but this is no longer supported.
|
|
|
|
### Disable preloading for that font
|
|
|
|
If it's not possible to preload your intended subset you can disable preloading.
|
|
|
|
```js filename="example.js"
|
|
const notoSansJapanese = Noto_Sans_JP({
|
|
weight: '400',
|
|
preload: false,
|
|
})
|
|
```
|
|
|
|
## Useful Links
|
|
|
|
- [Specifying a subset](/docs/pages/api-reference/components/font#specifying-a-subset)
|