@acidwave/typeface-montserrat 中文文档教程
@acidwave/typeface-montserrat
CSS 和网络字体文件,可轻松自托管“Montserrat”。
Install
npm install --save @acidwave/typeface-montserrat
Use
字体假定您正在使用 webpack 来处理 CSS 和文件。 每种字体 软件包包括所有必要的字体文件(woff2、woff)和一个 CSS 文件 指向这些文件的字体声明。
您将需要设置 webpack 来加载 css 和字体文件。 构建了许多工具 使用 Webpack 可以开箱即用的字体,例如 Gatsby 和创建 React 应用。
要使用,只需在项目的入口文件中要求包,例如
// Load Montserrat typeface
require('@acidwave/typeface-montserrat')
@acidwave/typeface-montserrat
The CSS and web font files to easily self-host “Montserrat”.
Install
npm install --save @acidwave/typeface-montserrat
Use
Typefaces assume you’re using webpack to process CSS and files. Each typeface package includes all necessary font files (woff2, woff) and a CSS file with font-face declarations pointing at these files.
You will need to have webpack setup to load css and font files. Many tools built with Webpack will work out of the box with Typefaces such as Gatsby and Create React App.
To use, simply require the package in your project’s entry file e.g.
// Load Montserrat typeface
require('@acidwave/typeface-montserrat')