Google Fonts loader
Use Google Fonts in your Framer.js prototypes.
Usage
$ cd <myProject>.framer$ npm install --save framer-googlefonts
modules/myModule.coffee:
exports.GoogleFonts = require "framer-googlefonts"
app.coffee:
require "myModule" "Roboto" UtilslabelLayer center"Hello, World!" fontFamily: "Roboto" fontSize: "16px"
API
GoogleFonts#load <mixed>
This can take just about anything you throw at it. You can also load fonts by passing arguments to the constructor.
gf = "Roboto" gfload "Droid Sans"400700gfload font: "Roboto"weights: "500italic"gfload font: "Roboto Slab"weights: "400, 500" font: "Roboto Condensed"
Events
Supports all the Web Font Loader events.
loading
- This event is triggered when all fonts have been requested.active
- This event is triggered when the fonts have rendered.inactive
- This event is triggered when the browser does not support linked fonts or if none of the fonts could be loaded.fontloading
- This event is triggered once for each font that's loaded.fontactive
- This event is triggered once for each font that renders.fontinactive
- This event is triggered if the font can't be loaded.