Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

framer-googlefonts

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

framer-googlefonts

Google Fonts loader.

  • 0.3.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
Maintainers
1
Weekly downloads
 
Created
Source

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:

{GoogleFonts} = require "myModule"

new GoogleFonts "Roboto"

Utils.labelLayer new Layer().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 = new GoogleFonts "Roboto"

gf.load "Droid Sans", 400, 700
gf.load font: "Roboto", weights: "500italic"
gf.load [
  { 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.

Keywords

FAQs

Package last updated on 06 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc