Fontsource
Graphics collection · Free
Open font packages for self-hosting: connect families, weights/styles, and variable fonts through npm instead of an external CDN.
Also known as: fontsource/fontsource

What you can use for free
npm packages and self-hosting of the available open fonts are free; retain the chosen family’s LICENSE.
Paid features and costs
Fontsource integration requires no mandatory subscription. Paid third-party fonts cannot automatically be treated as part of the collection; check rights for the specific file.
Access and limitations
npm packages and self-hosting of the available open fonts are free; retain the chosen family’s LICENSE. Fontsource integration requires no mandatory subscription. Paid third-party fonts cannot automatically be treated as part of the collection; check rights for the specific file.
Use cases
- Self-hosting a website font
- Loading only the required styles and subsets
Example workflow
A possible workflow; this is not a report of hands-on testing.
Add an open font through npm and host the files on your own website.
Before you start
- The selected Fontsource family, styles, languages, and specific package license.
- A project with npm/build tooling and font-display/fallback settings.
Steps
- Install the chosen family's package, check its LICENSE and supported subsets/variable axes.
- Import only the required styles/subsets and apply font-family with a suitable fallback.
- Check WOFF2 loading from your own domain, Cyrillic display, and the absence of text shifts.
Check your result
- All required characters/styles are available; the package license is retained.
- Files are not fetched from an unnecessary external CDN; the chosen font payload is appropriate.
Choosing Fontsource
Self-hosting a website font
Choose this when
- Self-hosting a website font
- Loading only the required styles and subsets
Requirements
- Use a bundler supporting CSS imports, such as Vite or Webpack; the package and import must match the selected family.
Things to consider
- Costs and limits of free use: Fontsource integration requires no mandatory subscription. Paid third-party fonts cannot automatically be treated as part of the collection; check rights for the specific file.
- Terms of use: MIT for Fontsource code; fonts retain their individual family licenses. Check the LICENSE of the specific npm package: the tool’s general license does not replace font rights.
- A normal import does not include italic automatically. Check the selected font's license separately from the Fontsource tool license.
Frequently asked questions
What can you use for free in Fontsource?
npm packages and self-hosting of the available open fonts are free; retain the chosen family’s LICENSE.
What additional costs might arise with Fontsource?
Fontsource integration requires no mandatory subscription. Paid third-party fonts cannot automatically be treated as part of the collection; check rights for the specific file.
What terms of use matter for Fontsource?
MIT for Fontsource code; fonts retain their individual family licenses. Check the LICENSE of the specific npm package: the tool’s general license does not replace font rights.
How do you get started with Fontsource?
Install the chosen family's package, check its LICENSE and supported subsets/variable axes. Import only the required styles/subsets and apply font-family with a suitable fallback. Check WOFF2 loading from your own domain, Cyrillic display, and the absence of text shifts.
How do I reduce font file count and add the required styles through Fontsource?
A variable package applies to a variable-font family and supports a weight range rather than separate weight files. In a static package, an ordinary root import usually loads normal 400; additional weights and italic are imported separately. Unicode-range lets the browser load the required character sets. After importing, set font-family in CSS.
Related tasks and approaches
License
MIT for Fontsource code; fonts retain their individual family licenses. Check the LICENSE of the specific npm package: the tool’s general license does not replace font rights.
MIT — permissive license
You can use, modify, distribute, and sell the code, including in a closed-source commercial product. When sharing copies or substantial portions of the code, retain the license text and copyright notice. You do not need to open-source your entire project; the author provides no warranties.
License termsEach asset has its own rights
A catalog or gallery does not grant one license for all its content. Check code, fonts, images, models, and templates under the specific resource's license. Studying an idea and creating your own implementation is a different use case from copying source code or assets.
Technologies and topics
- npm
- CSS
- WOFF2
- fonts