Automatic font configuration for Nuxt apps
npm install @nuxt/fonts[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![License][license-src]][license-href]
[![Nuxt][nuxt-src]][nuxt-href]
[![Volta][volta-src]][volta-href]
Plug-and-play custom web font optimization and configuration for Nuxt apps.
- š Read Documentation
- š¾ Playground
- ⨠zero-configuration required
- š” built-in providers (google, bunny, fontshare, fontsource, adobe, local - more welcome!)
- šŖ custom providers for full control
- ⬠local download support (until nuxt/assets lands)
- ā”ļø automatic font metric optimisation powered by fontaine and capsize
- š„ build/dev time font caching powered by unstorage
š See Nuxt Fonts RFC for full details and discussion.
Install @nuxt/fonts dependency to your project:
``sh`
npx nuxt module add fonts
- Clone this repository
- Enable Corepack using corepack enablepnpm install
- Install dependencies using pnpm dev:prepare
- Run to generate type stubs.pnpm dev` to start the basic playground in development mode.
- Use
Published under the MIT License
[npm-version-src]: https://img.shields.io/npm/v/@nuxt/fonts/latest.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-version-href]: https://npm.chart.dev/@nuxt/fonts
[npm-downloads-src]: https://img.shields.io/npm/dm/@nuxt/fonts.svg?style=flat&colorA=18181B&colorB=28CF8D
[npm-downloads-href]: https://npm.chart.dev/@nuxt/fonts/v/latest
[license-src]: https://img.shields.io/npm/l/@nuxt/fonts.svg?style=flat&colorA=18181B&colorB=28CF8D
[license-href]: https://npmjs.com/package/@nuxt/fonts/v/latest
[nuxt-src]: https://img.shields.io/badge/Nuxt-18181B?logo=nuxt
[nuxt-href]: https://nuxt.com
[volta-src]: https://user-images.githubusercontent.com/904724/209143798-32345f6c-3cf8-4e06-9659-f4ace4a6acde.svg
[volta-href]: https://volta.net/nuxt/fonts?utm_source=nuxt_fonts_readme