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
14 changes: 11 additions & 3 deletions src/content/docs/en/reference/experimental-flags/fonts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,9 @@ display: "block"
**Default:** `undefined`
</p>

Determines the specific [range of unicode characters](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range) to be used from a font:
Determines when a font must be downloaded and used based on a specific [range of unicode characters](https://developer.mozilla.org/en-US/docs/Web/CSS/@font-face/unicode-range). If a character on the page matches the configured range, the browser will download the font and all characters will be available for use on the page. To configure a subset of characters preloaded for a single font, see the [subsets](#subsets) property instead.

This can be useful for localization to avoid unnecessary font downloads when a specific part of your website uses a different alphabet and will be displayed with a separate font. For example, a website that offers both English and Japanese versions can prevent the browser from downloading the Japanese font on English versions of the page that do not contain any of the Japanese characters provided in `unicodeRange`.

```js
unicodeRange: ["U+26"]
Expand Down Expand Up @@ -533,7 +535,8 @@ export default defineConfig({

<p>

**Type:** `number | string`
**Type:** `number | string`<br />
**Default:** `undefined`
</p>

A [font weight](https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight):
Expand All @@ -548,11 +551,14 @@ If the associated font is a [variable font](https://developer.mozilla.org/en-US/
weight: "100 900"
```

If left undefined, Astro will try to infer the value based on the first [`source`](#src).

#### style

<p>

**Type:** `"normal" | "italic" | "oblique"`
**Type:** `"normal" | "italic" | "oblique"`<br />
**Default:** `undefined`
</p>

A [font style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style):
Expand All @@ -561,6 +567,8 @@ A [font style](https://developer.mozilla.org/en-US/docs/Web/CSS/font-style):
style: "normal"
```

If left undefined, Astro will try to infer the value based on the first [`source`](#src).

#### src

<p>
Expand Down