Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion src/content/docs/en/reference/experimental-flags/fonts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ body {
});
```

More configuration options, such as defining [fallback font families](#fallbacks) and which [`weights`](#weights), [`styles`](#styles) and [`subsets`](#subsets) to download, are available and some will depend on your chosen provider.
More configuration options, such as defining [fallback font families](#fallbacks) and which [`weights`](#weights), [`styles`](#styles), [`subsets`](#subsets) and [`formats`](#formats) to download, are available and some will depend on your chosen provider.

See the full [configuration reference](#font-configuration-reference) to learn more.

Expand Down Expand Up @@ -237,6 +237,7 @@ export default defineConfig({
// styles: ["normal", "italics"],
// subsets: ["latin"],
// fallbacks: ["sans-serif"],
// formats: ["woff2"],
},
{
name: "Inter",
Expand All @@ -248,6 +249,8 @@ export default defineConfig({
styles: ["normal"],
// Download only font files for characters used on the page
subsets: ["latin", "cyrillic"],
// Download more font formats
formats: ["woff2", "woff"],
},
{
name: "JetBrains Mono",
Expand Down Expand Up @@ -561,6 +564,21 @@ Defines a list of [font subsets](https://knaap.dev/posts/font-subsetting/) to pr
subsets: ["latin"]
```

#### formats

<p>

**Type:** `("woff2" | "woff" | "otf" | "ttf" | "eot")[]`<br />
**Default:** `["woff2"]`
<Since v="5.16.7" />
</p>

An array of [font formats](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@font-face/src#font_formats):

```js
formats: ["woff2", "woff"]
```

#### display

<p>
Expand Down