insert-fonts
Insert a set of fonts using base64 encoding and CSS font-face tags
Install
$ npm install --save insert-fonts
Usage
var insertFonts = //=> creates fonts and inserts @font-face tags into the dom
API
insertFonts(fonts)
-> string
Returns the inserted CSS string.
fonts
Required
Type: object
An object where the keys/values represent font face names and their weights, respectively. The weights are also objects, where the keys/values represent the weight and the font data (base 64 encoded), respectively.
License
MIT © Ben Drucker