Sha256: facf2e0eec927fdf5f4c279991bb324d1b519d4076fbf8fea2164893bbf8b975

Contents?: true

Size: 1.02 KB

Versions: 8

Compression:

Stored size: 1.02 KB

Contents

# Modules

WebFont Loader provides a generic module system so that any web font provider
may be used. The specifics of each provider are documented here.


## Google

Using Google's Font API, name the font families you'd like to load.

    WebFont.load({
      google: {
        families: ['Droid Sans', 'Droid Serif']
      }
    });

Learn more about the [Google Font API][gfontapi].


## Typekit

When using Typekit, specify the Kit to retrieve by its ID. You can find this
ID within Typekit's Kit Editor interface.

    WebFont.load({
      typekit: {
        id: 'xxxxxx'
      }
    });

Learn more about [Typekit][tk].


## Custom

To load fonts from any external stylesheet, use the `custom` module. Here you'll
need to specify both the url of the stylesheet as well as the font families it
provides.

    WebFont.load({
      custom: {
        families: ['My Font', 'My Other Font'],
        urls: ['/fonts.css']
      }
    });


[gfontapi]: https://code.google.com/apis/webfonts/docs/getting_started.html
[tk]: http://typekit.com/

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
webfontloader-1.0.16 docs/MODULES.md
webfontloader-1.0.15 docs/MODULES.md
webfontloader-1.0.13 docs/MODULES.md
webfontloader-1.0.9 docs/MODULES.md
webfontloader-1.0.8 docs/MODULES.md
webfontloader-1.0.7 docs/MODULES.md
webfontloader-1.0.6 docs/MODULES.md
webfontloader-1.0.5 docs/MODULES.md