Skip to content

Self-host Open Source fonts in neatly bundled NPM packages.

License

Notifications You must be signed in to change notification settings

curtvict/fontsource

 
 

Repository files navigation

Fontsource

Generic badge codecov Monthly Downloads Total Downloads License GitHub stars

An updating monorepo full of self-hostable Open Source fonts bundled into individual NPM packages!

Our full documentation and search directory can be found here. https://fontsource.org/

Alternatively, you can see the list of supported fonts in Markdown format here.

  • Self-hosting brings significant performance gains as loading fonts from hosted services, such as Google Fonts, lead to an extra (render blocking) network request. To provide perspective, for simple websites it has been seen to double visual load times. Benchmarks can be found here and here.

  • Fonts remain version locked. Google often pushes updates to their fonts without notice, which may interfere with your live production projects. Manage your fonts like any other NPM dependency.

  • Commit to privacy. Google does track the usage of their fonts and for those who are extremely privacy concerned, self-hosting is an alternative.

  • Your fonts load offline. On top of benefiting PWAs, often there may be situations, like working in an airplane or train, leaving you stranded without access to your online hosted fonts. Have the ability to keep working under any circumstance.

  • Support for fonts outside the Google Font ecosystem. This repository is constantly evolving with other Open Source fonts. Feel free to contribute!

API

Check out the documentation here.

Migrating from previous versions

See CHANGELOG.md for more details.

Adding New Fonts

For Open Source fonts that are not automatically updated by the Google ecosystem, we have a generic packager that builds CSS files for the project.

Make a request by creating an issue! If you wish to submit a PR yourself, check out the documentation on packaging the fonts yourself here.

Licensing

It is important to always read the license for every font that you use. Most of the fonts in the collection use the SIL Open Font License, v1.1. Some fonts use the Apache 2 license. The Ubuntu fonts use the Ubuntu Font License v1.0.

You can find their specific licenses on each package README.md.

Other Notes

Feel free to star and contribute new ideas to this repository that aim to improve the performance of font loading, as well as expanding the existing library we already have. Any suggestions or ideas can be voiced via an issue.

Community Sponsors

  

About

Self-host Open Source fonts in neatly bundled NPM packages.

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 82.8%
  • SCSS 16.8%
  • Other 0.4%