Coffeekraken.io 0.0.1

SLocalStorageFonts

This class allows to easily store and load custom fonts from the localStorage

Example

    new SLocalStorageFonts({
     json_path : '/fonts/fonts.json#v1'
});

// the fonts.json file looks like this
{
        "fonts" : [{
          "font-family" : "Open Sans",
        "font-weight" : 300,
         "src" : "url(data:application/font-woff;base64,d09GRgA..."
     }]
}

Author : Olivier Bosselolivier.bossel@gmail.com

Constructor

Name Type Description Status Default
settings { Object } The settings required

Settings

Here's the list of available settings.

version

Store the version of the fonts to load. Used for cache busting

Type : { String }

Default : 1.0

json_path

Set the json file to load

Type : { String }

Default : /fonts/fonts.json

debug

Set if want the debug messages in the console

Type : { Boolean }

Default : false