项目作者: breuleux

项目描述 :
Easily integrate fonts on Google Fonts in Quaint
高级语言: JavaScript
项目地址: git://github.com/breuleux/quaint-google-fonts.git
创建时间: 2015-12-14T20:16:54Z
项目社区:https://github.com/breuleux/quaint-google-fonts

开源协议:

下载


quaint-google-fonts

This plugin lets you easily import fonts from Google Fonts for use in
your pages.

Install

  1. quaint --setup google-fonts

Follow the instructions.

Sample configuration

This configuration entry must be added in the plugins field of
quaint.json:

  1. "google-fonts": {
  2. "fonts": [
  3. "Open Sans",
  4. "Alegreya:400,400italic,700"
  5. ]
  6. }

Usage

The fonts you choose to import will be available for use in your CSS
files and directives, like any other font.

Options

fonts

An array of font names.

For each font you can also add styles (bold, italic) and character
sets you want (greek, cyrillic, etc). For example:

  1. "Open Sans:400,400italic,700&subset=latin,greek"

will load the Open Sans font with the normal (400), normal italic, and
bold (700) styles, and the latin and greek character sets. Note that
each style and subset you add will add to the size of the download, by
a factor equal to the number of possible combinations: just “Open
Sans” is about 15 KB, but the above set is 90 KB (but it will look
nicer).

Browse Google Fonts for the list of
fonts available. If you add them to your collection and then click
“Use” at the bottom, you get to pick the styles and character sets and
you can copy/paste the code given. Not all fonts have all possible
styles.