Skip to content

Commit

Permalink
docs: call out limited default font-weights (#399)
Browse files Browse the repository at this point in the history
  • Loading branch information
rijkvanzanten authored Nov 24, 2024
1 parent 8a0b558 commit a58ba98
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/content/1.get-started/1.installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ div {
That's it! Nuxt Fonts will detect this and you should immediately see the web font loaded in your browser. [Read more about how it works](/advanced#how-it-works).

::callout{icon="i-heroicons-exclamation-triangle" color="amber"}
To improve performance, `@nuxt/fonts` by default only loads the normal/400 font-weight. See the [configuration docs](/get-started/configuration#styles) on how to change this default.
::

::callout
Check out the [configuration docs](/get-started/configuration) for all available options and features to customize.
::
Expand Down Expand Up @@ -98,3 +102,5 @@ If an error occurs during installation:
- Check your network connection. Your machine might be having a hard time communicating with the font providers.

- If none of the above worked, please [open an issue](https://github.com/nuxt/fonts/issues) and include the error trace, OS, Node version and the package manager used for installing.

- If you're missing certain fonts or their variations, please confirm the module is [configured to load](/get-started/configuration#styles) the fonts you expected to see.
6 changes: 6 additions & 0 deletions docs/content/1.get-started/2.configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ export default defineNuxtConfig({
})
```

#### `weights`

Default: `[400]`

Defines the font-weights that should be downloaded for a font.

#### `styles`

Default: `['normal', 'italic']`
Expand Down

0 comments on commit a58ba98

Please sign in to comment.