typekit/webfontloader — pull request #63 by allmarkedup (2012-09-14 08:59:58+00:00)
Title: Media query support in custom font loader

I've had a few responsive projects recently where I've wanted to only load webfonts in for larger screened devices, to avoid the extra size and http requests for mobile devices.

This small change makes it possible to specify a media attribute to be added to the `` element that gets injected into the head (for the custom loader option), by adding a 'media' item, as follows:

```js
WebFontConfig = {
custom: { families: ['OneFont', 'AnotherFont'],
urls: [ 'http://myotherwebfontprovider.com/stylesheet1.css',
'http://yetanotherwebfontprovider.com/stylesheet2.css' ],
media: 'screen and (min-width: 480px)' }
};
```