项目作者: bedlaj

项目描述 :
NPM packages for all graduated Google Fonts typefaces including non-english subsets.
高级语言: CSS
项目地址: git://github.com/bedlaj/openfonts.git
创建时间: 2019-08-25T18:39:56Z
项目社区:https://github.com/bedlaj/openfonts

开源协议:MIT License

下载


What

This is fork of awesome project typefaces, allowing to use different character subsets.

Each typeface package ships with all the necessary font files and css to
self-host an open source typeface.

All Google Fonts have been added as well.

How

Couldn’t be easier. This is how you’d add Open Sans.

  1. npm install --save @openfonts/open-sans_latin

Then in your app or site’s entry file.

  1. require("@openfonts/open-sans_latin")

And that’s it! You’re now self-hosting Open Sans!

It should take < 5 minutes to swap out Google Fonts.

Typeface assumes you’re using webpack with loaders setup for loading css
and font files (you can use Typeface with other setups but webpack makes
things really really simple). Assuming your webpack configuration is
setup correctly you then just need to require the typeface in the entry
file for your project.