webfontloader 1.6.27 → 1.6.28
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +4 -0
- data/README.md +5 -4
- data/lib/webfontloader.rb +1 -1
- data/lib/webfontloader/demo/server.rb +3 -3
- data/package.json +1 -1
- data/spec/core/domhelper_spec.js +0 -94
- data/spec/modules/custom_spec.js +3 -3
- data/spec/modules/fontdeck_spec.js +10 -11
- data/spec/modules/google/fontapiurlbuilder_spec.js +9 -9
- data/spec/modules/google/googlefontapi_spec.js +5 -8
- data/spec/modules/monotype_spec.js +3 -4
- data/spec/modules/typekit_spec.js +1 -2
- data/src/core/domhelper.js +0 -35
- data/src/core/nativefontwatchrunner.js +8 -3
- data/src/modules/custom.js +1 -1
- data/src/modules/fontdeck.js +2 -3
- data/src/modules/google/fontapiurlbuilder.js +3 -3
- data/src/modules/google/googlefontapi.js +0 -1
- data/src/modules/monotype.js +2 -3
- data/webfontloader.gemspec +2 -2
- data/webfontloader.js +16 -17
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7fa1effb05b494900f92231f6497f8ee9f2f266f
|
4
|
+
data.tar.gz: 63bf8555e245b4544735bfd16e8f8d6c8fdb6f06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9beba4cd52ccd66a8a2cbe388d8d3301ad29ad8465073562fabcd437db038d93df5d263195ae629466d38f6f622789129c8aa902c59dec5f75058c8b65cb618b
|
7
|
+
data.tar.gz: dcdee4cbfa88c333575593f7d40f565d89322473245d9412910b0626fc283466ae0d33d299ed3135ab5f64c9132ba917c9c39667c78b4deecd192b5e6d9f65fd
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,7 @@ Web Font Loader gives you added control when using linked fonts via `@font-face`
|
|
26
26
|
To use the Web Font Loader library, just include it in your page and tell it which fonts to load. For example, you could load fonts from [Google Fonts](http://www.google.com/fonts/) using the Web Font Loader hosted on [Google Hosted Libraries](https://developers.google.com/speed/libraries/) using the following code.
|
27
27
|
|
28
28
|
```html
|
29
|
-
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.
|
29
|
+
<script src="https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js"></script>
|
30
30
|
<script>
|
31
31
|
WebFont.load({
|
32
32
|
google: {
|
@@ -36,7 +36,7 @@ To use the Web Font Loader library, just include it in your page and tell it whi
|
|
36
36
|
</script>
|
37
37
|
```
|
38
38
|
|
39
|
-
Alternatively, you can link to the latest `1.x` version of the Web Font Loader by using `https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js` as the `script` source. Note that the version in this url is less specific. It will always load the latest `1.x` version, but it also has a shorter cache time to ensure that your page gets updates in a timely manner. For performance reasons, we recommend using an explicit version number (such as `1.6.
|
39
|
+
Alternatively, you can link to the latest `1.x` version of the Web Font Loader by using `https://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js` as the `script` source. Note that the version in this url is less specific. It will always load the latest `1.x` version, but it also has a shorter cache time to ensure that your page gets updates in a timely manner. For performance reasons, we recommend using an explicit version number (such as `1.6.26`) in urls when using the Web Font Loader in production. You can manually update the Web Font Loader version number in the url when you want to adopt a new version.
|
40
40
|
|
41
41
|
Web Font Loader is also available on the [jsDelivr](http://www.jsdelivr.com/projects/webfontloader) & [CDNJS](https://cdnjs.com/libraries/webfont) CDNs.
|
42
42
|
|
@@ -50,7 +50,8 @@ It is also possible to use the Web Font Loader asynchronously. For example, to l
|
|
50
50
|
|
51
51
|
(function(d) {
|
52
52
|
var wf = d.createElement('script'), s = d.scripts[0];
|
53
|
-
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.
|
53
|
+
wf.src = 'https://ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js';
|
54
|
+
wf.async = true;
|
54
55
|
s.parentNode.insertBefore(wf, s);
|
55
56
|
})(document);
|
56
57
|
</script>
|
@@ -384,7 +385,7 @@ If `providerA` can serve fonts to a browser, but `providerB` cannot, The `fontin
|
|
384
385
|
|
385
386
|
## Copyright and License
|
386
387
|
|
387
|
-
Web Font Loader Copyright (c) 2010 Adobe Systems Incorporated, Google Incorporated.
|
388
|
+
Web Font Loader Copyright (c) 2010-2017 Adobe Systems Incorporated, Google Incorporated.
|
388
389
|
|
389
390
|
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
390
391
|
|
data/lib/webfontloader.rb
CHANGED
@@ -8,8 +8,8 @@ module WebFontLoader
|
|
8
8
|
DemoRoot = File.expand_path(File.join(File.dirname(__FILE__)))
|
9
9
|
ProjectRoot = File.expand_path(File.join(File.dirname(__FILE__), "..", "..", ".."))
|
10
10
|
|
11
|
-
GoogleApi = "
|
12
|
-
GoogleFontApi = "
|
11
|
+
GoogleApi = "https://fonts.googleapis.com/css"
|
12
|
+
GoogleFontApi = "https://themes.googleusercontent.com/font"
|
13
13
|
|
14
14
|
set :app_file, __FILE__
|
15
15
|
set :sessions, false
|
@@ -43,7 +43,7 @@ module WebFontLoader
|
|
43
43
|
headers 'Cache-Control' => 'max-age=300'
|
44
44
|
response = open(url, 'User-Agent' => env['HTTP_USER_AGENT'])
|
45
45
|
source = response.read
|
46
|
-
source.gsub!(%r[
|
46
|
+
source.gsub!(%r[https://themes.googleusercontent.com/font], '/fonts/font')
|
47
47
|
source
|
48
48
|
end
|
49
49
|
|
data/package.json
CHANGED
data/spec/core/domhelper_spec.js
CHANGED
@@ -405,100 +405,6 @@ describe('DomHelper', function () {
|
|
405
405
|
});
|
406
406
|
});
|
407
407
|
|
408
|
-
describe('#getProtocol', function () {
|
409
|
-
it('should return http', function () {
|
410
|
-
var domHelper = new DomHelper({
|
411
|
-
location: {
|
412
|
-
protocol: 'http:'
|
413
|
-
}
|
414
|
-
});
|
415
|
-
|
416
|
-
expect(domHelper.getProtocol()).toEqual('http:');
|
417
|
-
});
|
418
|
-
|
419
|
-
it('should return https', function () {
|
420
|
-
var domHelper = new DomHelper({
|
421
|
-
location: {
|
422
|
-
protocol: 'https:'
|
423
|
-
}
|
424
|
-
});
|
425
|
-
|
426
|
-
expect(domHelper.getProtocol()).toEqual('https:');
|
427
|
-
});
|
428
|
-
|
429
|
-
it('should return the protocol from an iframe', function () {
|
430
|
-
var domHelper = new DomHelper({
|
431
|
-
location: {
|
432
|
-
protocol: 'https:'
|
433
|
-
}
|
434
|
-
}, {
|
435
|
-
location: {
|
436
|
-
protocol: 'http:'
|
437
|
-
}
|
438
|
-
});
|
439
|
-
|
440
|
-
expect(domHelper.getProtocol()).toEqual('http:');
|
441
|
-
});
|
442
|
-
|
443
|
-
it('should return the protocol from the main window if the iframe has no protocol', function () {
|
444
|
-
var domHelper = new DomHelper({
|
445
|
-
location: {
|
446
|
-
protocol: 'http:'
|
447
|
-
}
|
448
|
-
}, {
|
449
|
-
location: {
|
450
|
-
protocol: 'about:'
|
451
|
-
}
|
452
|
-
});
|
453
|
-
|
454
|
-
expect(domHelper.getProtocol()).toEqual('http:');
|
455
|
-
});
|
456
|
-
});
|
457
|
-
|
458
|
-
describe('#setProtocol', function () {
|
459
|
-
it('ignores invalid values', function () {
|
460
|
-
var domHelper = new DomHelper({
|
461
|
-
location: 'http:'
|
462
|
-
});
|
463
|
-
|
464
|
-
domHelper.setProtocol('huh');
|
465
|
-
|
466
|
-
expect(domHelper.getProtocol()).toEqual('http:');
|
467
|
-
});
|
468
|
-
|
469
|
-
it('overrides the global value', function () {
|
470
|
-
var domHelper = new DomHelper({
|
471
|
-
location: 'http:'
|
472
|
-
});
|
473
|
-
|
474
|
-
domHelper.setProtocol('https:');
|
475
|
-
|
476
|
-
expect(domHelper.getProtocol()).toEqual('https:');
|
477
|
-
});
|
478
|
-
});
|
479
|
-
|
480
|
-
describe('#isHttps', function () {
|
481
|
-
it('should return true if the protocol is https', function () {
|
482
|
-
var domHelper = new DomHelper({
|
483
|
-
location: {
|
484
|
-
protocol: 'https:'
|
485
|
-
}
|
486
|
-
});
|
487
|
-
|
488
|
-
expect(domHelper.isHttps()).toBe(true);
|
489
|
-
});
|
490
|
-
|
491
|
-
it('should return false if the protocol is not https', function () {
|
492
|
-
var domHelper = new DomHelper({
|
493
|
-
location: {
|
494
|
-
protocol: 'http:'
|
495
|
-
}
|
496
|
-
});
|
497
|
-
|
498
|
-
expect(domHelper.isHttps()).toBe(false);
|
499
|
-
});
|
500
|
-
});
|
501
|
-
|
502
408
|
describe('#getHostname', function () {
|
503
409
|
it('should return the hostname', function () {
|
504
410
|
var domHelper = new DomHelper({
|
data/spec/modules/custom_spec.js
CHANGED
@@ -24,7 +24,7 @@ describe('modules.Custom', function () {
|
|
24
24
|
|
25
25
|
var defaultModule = new Custom(fakeDomHelper, {
|
26
26
|
families: ['Font1', 'Font2', 'Font3'],
|
27
|
-
urls: ['
|
27
|
+
urls: ['https://moo', 'https://meuh'],
|
28
28
|
testStrings: {
|
29
29
|
Font3: 'hello world'
|
30
30
|
}
|
@@ -35,8 +35,8 @@ describe('modules.Custom', function () {
|
|
35
35
|
|
36
36
|
it('should have inserted the links correctly', function () {
|
37
37
|
expect(fakeDomHelper.loadStylesheet.callCount).toEqual(2);
|
38
|
-
expect(fakeDomHelper.loadStylesheet).toHaveBeenCalledWith('
|
39
|
-
expect(fakeDomHelper.loadStylesheet).toHaveBeenCalledWith('
|
38
|
+
expect(fakeDomHelper.loadStylesheet).toHaveBeenCalledWith('https://moo', new Any(Function));
|
39
|
+
expect(fakeDomHelper.loadStylesheet).toHaveBeenCalledWith('https://meuh', new Any(Function));
|
40
40
|
});
|
41
41
|
|
42
42
|
if (webfont.DomHelper.CAN_WAIT_STYLESHEET) {
|
@@ -8,9 +8,9 @@ describe('modules.Fontdeck', function () {
|
|
8
8
|
|
9
9
|
var apiResponse = {
|
10
10
|
"domain" : "localhost",
|
11
|
-
"cssurl" : "
|
11
|
+
"cssurl" : "https://f.fontdeck.com/s/css/03BmCXiV2AHwX/Rp+OBFTfD2oFs/localhost/2282.css",
|
12
12
|
"project" : 2282,
|
13
|
-
"cssbase" : "
|
13
|
+
"cssbase" : "https://f.fontdeck.com/s/css/03BmCXiV2AHwX/Rp+OBFTfD2oFs",
|
14
14
|
"fonts" : [
|
15
15
|
{
|
16
16
|
"font_family" : "'Fertigo Pro Regular', Fertigo, Constantia, Palatino, serif",
|
@@ -19,10 +19,10 @@ describe('modules.Fontdeck', function () {
|
|
19
19
|
"style" : "normal",
|
20
20
|
"weight" : "normal",
|
21
21
|
"font_urls" : {
|
22
|
-
"eot" : "
|
23
|
-
"ttf" : "
|
24
|
-
"woff" : "
|
25
|
-
"svg" : "
|
22
|
+
"eot" : "https://f.fontdeck.com/f/1/SUlFR0tid0kAA2vb11Ly/IGWDK+wV8TMAfV0J1Ej1J1GFRT1bssqrn6a.eot",
|
23
|
+
"ttf" : "https://f.fontdeck.com/f/1/SUlFR0tid0kAA2vb11Ly/IGWDK+wV8TMAfV0J1Ej1J1GFRT1bssqrn6a.ttf",
|
24
|
+
"woff" : "https://f.fontdeck.com/f/1/SUlFR0tid0kAA2vb11Ly/IGWDK+wV8TMAfV0J1Ej1J1GFRT1bssqrn6a.woff",
|
25
|
+
"svg" : "https://f.fontdeck.com/f/1/SUlFR0tid0kAA2vb11Ly/IGWDK+wV8TMAfV0J1Ej1J1GFRT1bssqrn6a.svg#104"
|
26
26
|
},
|
27
27
|
"id" : 104
|
28
28
|
},
|
@@ -33,10 +33,10 @@ describe('modules.Fontdeck', function () {
|
|
33
33
|
"style" : "italic",
|
34
34
|
"weight" : "bold",
|
35
35
|
"font_urls" : {
|
36
|
-
"eot" : "
|
37
|
-
"ttf" : "
|
38
|
-
"woff" : "
|
39
|
-
"svg" : "
|
36
|
+
"eot" : "https://f.fontdeck.com/f/1/azJEbTVyc1QAA11+CAE5C93+l/bAQx1ipRo6Maba19w3Yy5ng+qVWlfj.eot",
|
37
|
+
"ttf" : "https://f.fontdeck.com/f/1/azJEbTVyc1QAA11+CAE5C93+l/bAQx1ipRo6Maba19w3Yy5ng+qVWlfj.ttf",
|
38
|
+
"woff" : "https://f.fontdeck.com/f/1/azJEbTVyc1QAA11+CAE5C93+l/bAQx1ipRo6Maba19w3Yy5ng+qVWlfj.woff",
|
39
|
+
"svg" : "https://f.fontdeck.com/f/1/azJEbTVyc1QAA11+CAE5C93+l/bAQx1ipRo6Maba19w3Yy5ng+qVWlfj.svg#2256"
|
40
40
|
},
|
41
41
|
"id" : 2256
|
42
42
|
}
|
@@ -54,7 +54,6 @@ describe('modules.Fontdeck', function () {
|
|
54
54
|
fakeDomHelper = {
|
55
55
|
loadScript: jasmine.createSpy('loadScript'),
|
56
56
|
getLoadWindow: jasmine.createSpy('getLoadWindow').andReturn(global),
|
57
|
-
getProtocol: jasmine.createSpy('getProtocol').andReturn('https:'),
|
58
57
|
getHostName: function () { return 'test-host-name'; }
|
59
58
|
};
|
60
59
|
});
|
@@ -2,37 +2,37 @@ describe('modules.google.FontApiUrlBuilder', function () {
|
|
2
2
|
var FontApiUrlBuilder = webfont.modules.google.FontApiUrlBuilder;
|
3
3
|
|
4
4
|
it('should throw an exception if there are no font families', function () {
|
5
|
-
var builder = new FontApiUrlBuilder('
|
5
|
+
var builder = new FontApiUrlBuilder('https://moo');
|
6
6
|
expect(builder.build).toThrow();
|
7
7
|
});
|
8
8
|
|
9
9
|
it('should build a proper url', function () {
|
10
|
-
var builder = new FontApiUrlBuilder('
|
10
|
+
var builder = new FontApiUrlBuilder('https://moo');
|
11
11
|
builder.setFontFamilies(['Font1', 'Font2']);
|
12
|
-
expect(builder.build()).toEqual('
|
12
|
+
expect(builder.build()).toEqual('https://moo?family=Font1%7CFont2');
|
13
13
|
});
|
14
14
|
|
15
15
|
it('should build a proper url', function () {
|
16
|
-
var builder = new FontApiUrlBuilder(undefined
|
16
|
+
var builder = new FontApiUrlBuilder(undefined);
|
17
17
|
builder.setFontFamilies(['Font1', 'Font2']);
|
18
|
-
expect(builder.build()).toEqual(
|
18
|
+
expect(builder.build()).toEqual(
|
19
19
|
FontApiUrlBuilder.DEFAULT_API_URL +
|
20
20
|
'?family=Font1%7CFont2');
|
21
21
|
});
|
22
22
|
|
23
23
|
it('should build a proper url', function () {
|
24
|
-
var builder = new FontApiUrlBuilder(undefined
|
24
|
+
var builder = new FontApiUrlBuilder(undefined);
|
25
25
|
builder.setFontFamilies(['Font1:bold:greek,cyrillic', 'Font2:italic', 'Font3']);
|
26
|
-
expect(builder.build()).toEqual(
|
26
|
+
expect(builder.build()).toEqual(
|
27
27
|
FontApiUrlBuilder.DEFAULT_API_URL +
|
28
28
|
'?family=Font1:bold%7CFont2:italic%7CFont3' +
|
29
29
|
'&subset=greek,cyrillic');
|
30
30
|
});
|
31
31
|
|
32
32
|
it('should build a proper url', function () {
|
33
|
-
var builder = new FontApiUrlBuilder(undefined
|
33
|
+
var builder = new FontApiUrlBuilder(undefined);
|
34
34
|
builder.setFontFamilies(['Font1:bold,italic:greek,cyrillic', 'Font2:italic', 'Font3::latin']);
|
35
|
-
expect(builder.build()).toEqual(
|
35
|
+
expect(builder.build()).toEqual(
|
36
36
|
FontApiUrlBuilder.DEFAULT_API_URL +
|
37
37
|
'?family=Font1:bold,italic%7CFont2:italic%7CFont3' +
|
38
38
|
'&subset=greek,cyrillic,latin');
|
@@ -12,9 +12,6 @@ describe('modules.google.GoogleFontApi', function () {
|
|
12
12
|
loadStylesheet: function (cssLink, cb) {
|
13
13
|
link = cssLink;
|
14
14
|
onload = cb;
|
15
|
-
},
|
16
|
-
getProtocol: function () {
|
17
|
-
return 'http:';
|
18
15
|
}
|
19
16
|
};
|
20
17
|
|
@@ -42,7 +39,7 @@ describe('modules.google.GoogleFontApi', function () {
|
|
42
39
|
});
|
43
40
|
|
44
41
|
it('has inserted the link element correctly', function () {
|
45
|
-
expect(link).toEqual('
|
42
|
+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1%7CFont2');
|
46
43
|
});
|
47
44
|
|
48
45
|
it('has the correct families', function () {
|
@@ -61,14 +58,14 @@ describe('modules.google.GoogleFontApi', function () {
|
|
61
58
|
beforeEach(function () {
|
62
59
|
loaded = false;
|
63
60
|
googleFontApi = new GoogleFontApi(fakeDomHelper, {
|
64
|
-
api: '
|
61
|
+
api: 'https://moo',
|
65
62
|
families: ['Font1', 'Font2']
|
66
63
|
});
|
67
64
|
googleFontApi.load(function () { loaded = true; });
|
68
65
|
});
|
69
66
|
|
70
67
|
it('has inserted the link element correctly', function () {
|
71
|
-
expect(link).toEqual('
|
68
|
+
expect(link).toEqual('https://moo?family=Font1%7CFont2');
|
72
69
|
});
|
73
70
|
|
74
71
|
if (webfont.DomHelper.CAN_WAIT_STYLESHEET) {
|
@@ -91,7 +88,7 @@ describe('modules.google.GoogleFontApi', function () {
|
|
91
88
|
});
|
92
89
|
|
93
90
|
it('has inserted the link element correctly', function () {
|
94
|
-
expect(link).toEqual('
|
91
|
+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1+WithSpace%7CFont2+WithSpaceToo');
|
95
92
|
});
|
96
93
|
});
|
97
94
|
|
@@ -104,7 +101,7 @@ describe('modules.google.GoogleFontApi', function () {
|
|
104
101
|
});
|
105
102
|
|
106
103
|
it('has inserted the link element correctly', function () {
|
107
|
-
expect(link).toEqual('
|
104
|
+
expect(link).toEqual('https://fonts.googleapis.com/css?family=Font1+WithSpace:bi%7CFont2+WithSpaceToo:b,r');
|
108
105
|
});
|
109
106
|
});
|
110
107
|
});
|
@@ -7,7 +7,7 @@ describe('modules.Monotype', function () {
|
|
7
7
|
|
8
8
|
var configuration = {
|
9
9
|
projectId: '01e2ff27-25bf-4801-a23e-73d328e6c7cc',
|
10
|
-
api: '
|
10
|
+
api: 'https://fast.fonts.net/jsapidev'
|
11
11
|
};
|
12
12
|
|
13
13
|
var fakeDomHelper = null,
|
@@ -25,8 +25,7 @@ describe('modules.Monotype', function () {
|
|
25
25
|
script.onload = callback;
|
26
26
|
return script;
|
27
27
|
}),
|
28
|
-
getLoadWindow: jasmine.createSpy('getLoadWindow').andReturn(global)
|
29
|
-
getProtocol: jasmine.createSpy('getProtocol').andReturn('http:')
|
28
|
+
getLoadWindow: jasmine.createSpy('getLoadWindow').andReturn(global)
|
30
29
|
};
|
31
30
|
support = jasmine.createSpy('support');
|
32
31
|
load = jasmine.createSpy('load');
|
@@ -44,7 +43,7 @@ describe('modules.Monotype', function () {
|
|
44
43
|
|
45
44
|
it('should create a script element', function () {
|
46
45
|
expect(fakeDomHelper.loadScript).toHaveBeenCalled();
|
47
|
-
expect(fakeDomHelper.loadScript.calls[0].args[0]).toEqual('
|
46
|
+
expect(fakeDomHelper.loadScript.calls[0].args[0]).toEqual('https://fast.fonts.net/jsapidev/01e2ff27-25bf-4801-a23e-73d328e6c7cc.js');
|
48
47
|
expect(load).toHaveBeenCalledWith([new Font('aachen bold'), new Font('kid print regular')]);
|
49
48
|
});
|
50
49
|
});
|
@@ -29,8 +29,7 @@ describe('modules.Typekit', function () {
|
|
29
29
|
loadScript: jasmine.createSpy('loadScript').andCallFake(function (url, cb) {
|
30
30
|
cb(null);
|
31
31
|
}),
|
32
|
-
getLoadWindow: jasmine.createSpy('getLoadWindow').andReturn(global)
|
33
|
-
getProtocol: jasmine.createSpy('getProtocol').andReturn('http:')
|
32
|
+
getLoadWindow: jasmine.createSpy('getLoadWindow').andReturn(global)
|
34
33
|
};
|
35
34
|
});
|
36
35
|
|
data/src/core/domhelper.js
CHANGED
@@ -234,41 +234,6 @@ goog.scope(function () {
|
|
234
234
|
return this.loadWindow_;
|
235
235
|
};
|
236
236
|
|
237
|
-
/**
|
238
|
-
* @return {string} The protocol (http: or https:) to request resources in.
|
239
|
-
*/
|
240
|
-
DomHelper.prototype.getProtocol = function() {
|
241
|
-
if (typeof this.protocol_ === 'string') {
|
242
|
-
return this.protocol_;
|
243
|
-
} else {
|
244
|
-
var protocol = this.loadWindow_.location.protocol;
|
245
|
-
// For empty iframes, fallback to main window's protocol.
|
246
|
-
if (protocol == 'about:') {
|
247
|
-
protocol = this.mainWindow_.location.protocol;
|
248
|
-
}
|
249
|
-
return protocol == 'https:' ? 'https:' : 'http:';
|
250
|
-
}
|
251
|
-
};
|
252
|
-
|
253
|
-
/**
|
254
|
-
* Explicitly set the protocol instead of automatic detection.
|
255
|
-
*
|
256
|
-
* @param {string} protocol
|
257
|
-
*/
|
258
|
-
DomHelper.prototype.setProtocol = function (protocol) {
|
259
|
-
if (/^http(s)?:$/.test(protocol)) {
|
260
|
-
this.protocol_ = protocol;
|
261
|
-
}
|
262
|
-
};
|
263
|
-
|
264
|
-
/**
|
265
|
-
* Returns the secure status of the current document.
|
266
|
-
* @return {boolean} true if the current document is served securely.
|
267
|
-
*/
|
268
|
-
DomHelper.prototype.isHttps = function() {
|
269
|
-
return this.getProtocol() === 'https:';
|
270
|
-
};
|
271
|
-
|
272
237
|
/**
|
273
238
|
* Returns the hostname of the current document.
|
274
239
|
* @return {string} hostname.
|
@@ -51,11 +51,16 @@ goog.scope(function () {
|
|
51
51
|
check();
|
52
52
|
});
|
53
53
|
|
54
|
-
var
|
55
|
-
|
56
|
-
|
54
|
+
var timeoutId = null,
|
55
|
+
timer = new Promise(function (resolve, reject) {
|
56
|
+
timeoutId = setTimeout(reject, that.timeout_);
|
57
|
+
});
|
57
58
|
|
58
59
|
Promise.race([timer, loader]).then(function () {
|
60
|
+
if (timeoutId) {
|
61
|
+
clearTimeout(timeoutId);
|
62
|
+
timeoutId = null;
|
63
|
+
}
|
59
64
|
that.activeCallback_(that.font_);
|
60
65
|
}, function () {
|
61
66
|
that.inactiveCallback_(that.font_);
|
data/src/modules/custom.js
CHANGED
data/src/modules/fontdeck.js
CHANGED
@@ -18,7 +18,7 @@ webfont.modules.Fontdeck = function(domHelper, configuration) {
|
|
18
18
|
*/
|
19
19
|
webfont.modules.Fontdeck.NAME = 'fontdeck';
|
20
20
|
webfont.modules.Fontdeck.HOOK = '__webfontfontdeckmodule__';
|
21
|
-
webfont.modules.Fontdeck.API = '
|
21
|
+
webfont.modules.Fontdeck.API = 'https://f.fontdeck.com/s/css/js/';
|
22
22
|
|
23
23
|
goog.scope(function () {
|
24
24
|
var Fontdeck = webfont.modules.Fontdeck,
|
@@ -26,11 +26,10 @@ goog.scope(function () {
|
|
26
26
|
FontVariationDescription = webfont.FontVariationDescription;
|
27
27
|
|
28
28
|
Fontdeck.prototype.getScriptSrc = function(projectId) {
|
29
|
-
var protocol = this.domHelper_.getProtocol();
|
30
29
|
// For empty iframes, fall back to main window's hostname.
|
31
30
|
var hostname = this.domHelper_.getHostName();
|
32
31
|
var api = this.configuration_['api'] || webfont.modules.Fontdeck.API;
|
33
|
-
return
|
32
|
+
return api + hostname + '/' + projectId + '.js';
|
34
33
|
};
|
35
34
|
|
36
35
|
Fontdeck.prototype.load = function(onReady) {
|
@@ -3,11 +3,11 @@ goog.provide('webfont.modules.google.FontApiUrlBuilder');
|
|
3
3
|
/**
|
4
4
|
* @constructor
|
5
5
|
*/
|
6
|
-
webfont.modules.google.FontApiUrlBuilder = function(apiUrl,
|
6
|
+
webfont.modules.google.FontApiUrlBuilder = function(apiUrl, text) {
|
7
7
|
if (apiUrl) {
|
8
8
|
this.apiUrl_ = apiUrl;
|
9
9
|
} else {
|
10
|
-
this.apiUrl_ =
|
10
|
+
this.apiUrl_ = webfont.modules.google.FontApiUrlBuilder.DEFAULT_API_URL;
|
11
11
|
}
|
12
12
|
this.fontFamilies_ = [];
|
13
13
|
this.subsets_ = [];
|
@@ -15,7 +15,7 @@ webfont.modules.google.FontApiUrlBuilder = function(apiUrl, protocol, text) {
|
|
15
15
|
};
|
16
16
|
|
17
17
|
|
18
|
-
webfont.modules.google.FontApiUrlBuilder.DEFAULT_API_URL = '
|
18
|
+
webfont.modules.google.FontApiUrlBuilder.DEFAULT_API_URL = 'https://fonts.googleapis.com/css';
|
19
19
|
|
20
20
|
goog.scope(function () {
|
21
21
|
var FontApiUrlBuilder = webfont.modules.google.FontApiUrlBuilder;
|
data/src/modules/monotype.js
CHANGED
@@ -52,9 +52,8 @@ goog.scope(function() {
|
|
52
52
|
|
53
53
|
|
54
54
|
Monotype.prototype.getScriptSrc = function(projectId, version) {
|
55
|
-
var
|
56
|
-
|
57
|
-
return p + "//" + api + '/' + projectId + '.js' + (version ? '?v=' + version : '');
|
55
|
+
var api = (this.configuration_['api'] || 'https://fast.fonts.net/jsapi')
|
56
|
+
return api + '/' + projectId + '.js' + (version ? '?v=' + version : '');
|
58
57
|
};
|
59
58
|
|
60
59
|
Monotype.prototype.load = function(onReady) {
|
data/webfontloader.gemspec
CHANGED
@@ -13,8 +13,8 @@ Gem::Specification.new do |s|
|
|
13
13
|
## If your rubyforge_project name is different, then edit it and comment out
|
14
14
|
## the sub! line in the Rakefile
|
15
15
|
s.name = 'webfontloader'
|
16
|
-
s.version = '1.6.
|
17
|
-
s.date = '
|
16
|
+
s.version = '1.6.28'
|
17
|
+
s.date = '2017-05-27'
|
18
18
|
|
19
19
|
## Make sure your summary is short. The description may be as long
|
20
20
|
## as you like.
|
data/webfontloader.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
|
-
/* Web Font Loader v1.6.
|
1
|
+
/* Web Font Loader v1.6.28 - (c) Adobe Systems, Google. License: Apache 2.0 */(function(){function aa(a,b,c){return a.call.apply(a.bind,arguments)}function ba(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}return function(){return a.apply(b,arguments)}}function p(a,b,c){p=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?aa:ba;return p.apply(null,arguments)}var q=Date.now||function(){return+new Date};function ca(a,b){this.a=a;this.o=b||a;this.c=this.o.document}var da=!!window.FontFace;function t(a,b,c,d){b=a.c.createElement(b);if(c)for(var e in c)c.hasOwnProperty(e)&&("style"==e?b.style.cssText=c[e]:b.setAttribute(e,c[e]));d&&b.appendChild(a.c.createTextNode(d));return b}function u(a,b,c){a=a.c.getElementsByTagName(b)[0];a||(a=document.documentElement);a.insertBefore(c,a.lastChild)}function v(a){a.parentNode&&a.parentNode.removeChild(a)}
|
2
2
|
function w(a,b,c){b=b||[];c=c||[];for(var d=a.className.split(/\s+/),e=0;e<b.length;e+=1){for(var f=!1,g=0;g<d.length;g+=1)if(b[e]===d[g]){f=!0;break}f||d.push(b[e])}b=[];for(e=0;e<d.length;e+=1){f=!1;for(g=0;g<c.length;g+=1)if(d[e]===c[g]){f=!0;break}f||b.push(d[e])}a.className=b.join(" ").replace(/\s+/g," ").replace(/^\s+|\s+$/,"")}function y(a,b){for(var c=a.className.split(/\s+/),d=0,e=c.length;d<e;d++)if(c[d]==b)return!0;return!1}
|
3
|
-
function
|
4
|
-
function A(a,b,c){
|
5
|
-
function
|
6
|
-
|
7
|
-
|
8
|
-
function
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
g,0<d.length&&(d=Ba[d[0]])&&(a.c[e]=d))}a.c[e]||(d=Ba[e])&&(a.c[e]=d);for(d=0;d<f.length;d+=1)a.a.push(new H(e,f[d]))}};function Ga(a,b){this.c=a;this.a=b}var Ha={Arimo:!0,Cousine:!0,Tinos:!0};Ga.prototype.load=function(a){var b=new C,c=this.c,d=new va(this.a.api,z(c),this.a.text),e=this.a.families;xa(d,e);var f=new Aa(e);Fa(f);A(c,za(d),D(b));F(b,function(){a(f.a,f.c,Ha)})};function Ia(a,b){this.c=a;this.a=b}Ia.prototype.load=function(a){var b=this.a.id,c=this.c.m;b?B(this.c,(this.a.api||"https://use.typekit.net")+"/"+b+".js",function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],k=b[f+1],h=0;h<k.length;h++)e.push(new H(g,k[h]));try{c.Typekit.load({events:!1,classes:!1,async:!0})}catch(m){}a(e)}},2E3):a([])};function Ja(a,b){this.c=a;this.f=b;this.a=[]}Ja.prototype.load=function(a){var b=this.f.id,c=this.c.m,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,k=c.fonts.length;g<k;++g){var h=c.fonts[g];d.a.push(new H(h.name,ga("font-weight:"+h.weight+";font-style:"+h.style)))}a(d.a)},B(this.c,z(this.c)+(this.f.api||"//f.fontdeck.com/s/css/js/")+ea(this.c)+"/"+b+".js",function(b){b&&a([])})):a([])};var Y=new pa(window);Y.a.c.custom=function(a,b){return new ua(b,a)};Y.a.c.fontdeck=function(a,b){return new Ja(b,a)};Y.a.c.monotype=function(a,b){return new sa(b,a)};Y.a.c.typekit=function(a,b){return new Ia(b,a)};Y.a.c.google=function(a,b){return new Ga(b,a)};var Z={load:p(Y.load,Y)};"function"===typeof define&&define.amd?define(function(){return Z}):"undefined"!==typeof module&&module.exports?module.exports=Z:(window.WebFont=Z,window.WebFontConfig&&Y.load(window.WebFontConfig));}());
|
3
|
+
function ea(a){return a.o.location.hostname||a.a.location.hostname}function z(a,b,c){function d(){m&&e&&f&&(m(g),m=null)}b=t(a,"link",{rel:"stylesheet",href:b,media:"all"});var e=!1,f=!0,g=null,m=c||null;da?(b.onload=function(){e=!0;d()},b.onerror=function(){e=!0;g=Error("Stylesheet failed to load");d()}):setTimeout(function(){e=!0;d()},0);u(a,"head",b)}
|
4
|
+
function A(a,b,c,d){var e=a.c.getElementsByTagName("head")[0];if(e){var f=t(a,"script",{src:b}),g=!1;f.onload=f.onreadystatechange=function(){g||this.readyState&&"loaded"!=this.readyState&&"complete"!=this.readyState||(g=!0,c&&c(null),f.onload=f.onreadystatechange=null,"HEAD"==f.parentNode.tagName&&e.removeChild(f))};e.appendChild(f);setTimeout(function(){g||(g=!0,c&&c(Error("Script load timeout")))},d||5E3);return f}return null};function B(){this.a=0;this.c=null}function C(a){a.a++;return function(){a.a--;D(a)}}function E(a,b){a.c=b;D(a)}function D(a){0==a.a&&a.c&&(a.c(),a.c=null)};function F(a){this.a=a||"-"}F.prototype.c=function(a){for(var b=[],c=0;c<arguments.length;c++)b.push(arguments[c].replace(/[\W_]+/g,"").toLowerCase());return b.join(this.a)};function G(a,b){this.c=a;this.f=4;this.a="n";var c=(b||"n4").match(/^([nio])([1-9])$/i);c&&(this.a=c[1],this.f=parseInt(c[2],10))}function fa(a){return H(a)+" "+(a.f+"00")+" 300px "+I(a.c)}function I(a){var b=[];a=a.split(/,\s*/);for(var c=0;c<a.length;c++){var d=a[c].replace(/['"]/g,"");-1!=d.indexOf(" ")||/^\d/.test(d)?b.push("'"+d+"'"):b.push(d)}return b.join(",")}function J(a){return a.a+a.f}function H(a){var b="normal";"o"===a.a?b="oblique":"i"===a.a&&(b="italic");return b}
|
5
|
+
function ga(a){var b=4,c="n",d=null;a&&((d=a.match(/(normal|oblique|italic)/i))&&d[1]&&(c=d[1].substr(0,1).toLowerCase()),(d=a.match(/([1-9]00|normal|bold)/i))&&d[1]&&(/bold/i.test(d[1])?b=7:/[1-9]00/.test(d[1])&&(b=parseInt(d[1].substr(0,1),10))));return c+b};function ha(a,b){this.c=a;this.f=a.o.document.documentElement;this.h=b;this.a=new F("-");this.j=!1!==b.events;this.g=!1!==b.classes}function ia(a){a.g&&w(a.f,[a.a.c("wf","loading")]);K(a,"loading")}function L(a){if(a.g){var b=y(a.f,a.a.c("wf","active")),c=[],d=[a.a.c("wf","loading")];b||c.push(a.a.c("wf","inactive"));w(a.f,c,d)}K(a,"inactive")}function K(a,b,c){if(a.j&&a.h[b])if(c)a.h[b](c.c,J(c));else a.h[b]()};function ja(){this.c={}}function ka(a,b,c){var d=[],e;for(e in b)if(b.hasOwnProperty(e)){var f=a.c[e];f&&d.push(f(b[e],c))}return d};function M(a,b){this.c=a;this.f=b;this.a=t(this.c,"span",{"aria-hidden":"true"},this.f)}function N(a){u(a.c,"body",a.a)}function O(a){return"display:block;position:absolute;top:-9999px;left:-9999px;font-size:300px;width:auto;height:auto;line-height:normal;margin:0;padding:0;font-variant:normal;white-space:nowrap;font-family:"+I(a.c)+";"+("font-style:"+H(a)+";font-weight:"+(a.f+"00")+";")};function P(a,b,c,d,e,f){this.g=a;this.j=b;this.a=d;this.c=c;this.f=e||3E3;this.h=f||void 0}P.prototype.start=function(){var a=this.c.o.document,b=this,c=q(),d=new Promise(function(d,e){function f(){q()-c>=b.f?e():a.fonts.load(fa(b.a),b.h).then(function(a){1<=a.length?d():setTimeout(f,25)},function(){e()})}f()}),e=null,f=new Promise(function(a,d){e=setTimeout(d,b.f)});Promise.race([f,d]).then(function(){e&&(clearTimeout(e),e=null);b.g(b.a)},function(){b.j(b.a)})};function Q(a,b,c,d,e,f,g){this.v=a;this.B=b;this.c=c;this.a=d;this.s=g||"BESbswy";this.f={};this.w=e||3E3;this.u=f||null;this.m=this.j=this.h=this.g=null;this.g=new M(this.c,this.s);this.h=new M(this.c,this.s);this.j=new M(this.c,this.s);this.m=new M(this.c,this.s);a=new G(this.a.c+",serif",J(this.a));a=O(a);this.g.a.style.cssText=a;a=new G(this.a.c+",sans-serif",J(this.a));a=O(a);this.h.a.style.cssText=a;a=new G("serif",J(this.a));a=O(a);this.j.a.style.cssText=a;a=new G("sans-serif",J(this.a));a=
|
6
|
+
O(a);this.m.a.style.cssText=a;N(this.g);N(this.h);N(this.j);N(this.m)}var R={D:"serif",C:"sans-serif"},S=null;function T(){if(null===S){var a=/AppleWebKit\/([0-9]+)(?:\.([0-9]+))/.exec(window.navigator.userAgent);S=!!a&&(536>parseInt(a[1],10)||536===parseInt(a[1],10)&&11>=parseInt(a[2],10))}return S}Q.prototype.start=function(){this.f.serif=this.j.a.offsetWidth;this.f["sans-serif"]=this.m.a.offsetWidth;this.A=q();U(this)};
|
7
|
+
function la(a,b,c){for(var d in R)if(R.hasOwnProperty(d)&&b===a.f[R[d]]&&c===a.f[R[d]])return!0;return!1}function U(a){var b=a.g.a.offsetWidth,c=a.h.a.offsetWidth,d;(d=b===a.f.serif&&c===a.f["sans-serif"])||(d=T()&&la(a,b,c));d?q()-a.A>=a.w?T()&&la(a,b,c)&&(null===a.u||a.u.hasOwnProperty(a.a.c))?V(a,a.v):V(a,a.B):ma(a):V(a,a.v)}function ma(a){setTimeout(p(function(){U(this)},a),50)}function V(a,b){setTimeout(p(function(){v(this.g.a);v(this.h.a);v(this.j.a);v(this.m.a);b(this.a)},a),0)};function W(a,b,c){this.c=a;this.a=b;this.f=0;this.m=this.j=!1;this.s=c}var X=null;W.prototype.g=function(a){var b=this.a;b.g&&w(b.f,[b.a.c("wf",a.c,J(a).toString(),"active")],[b.a.c("wf",a.c,J(a).toString(),"loading"),b.a.c("wf",a.c,J(a).toString(),"inactive")]);K(b,"fontactive",a);this.m=!0;na(this)};
|
8
|
+
W.prototype.h=function(a){var b=this.a;if(b.g){var c=y(b.f,b.a.c("wf",a.c,J(a).toString(),"active")),d=[],e=[b.a.c("wf",a.c,J(a).toString(),"loading")];c||d.push(b.a.c("wf",a.c,J(a).toString(),"inactive"));w(b.f,d,e)}K(b,"fontinactive",a);na(this)};function na(a){0==--a.f&&a.j&&(a.m?(a=a.a,a.g&&w(a.f,[a.a.c("wf","active")],[a.a.c("wf","loading"),a.a.c("wf","inactive")]),K(a,"active")):L(a.a))};function oa(a){this.j=a;this.a=new ja;this.h=0;this.f=this.g=!0}oa.prototype.load=function(a){this.c=new ca(this.j,a.context||this.j);this.g=!1!==a.events;this.f=!1!==a.classes;pa(this,new ha(this.c,a),a)};
|
9
|
+
function qa(a,b,c,d,e){var f=0==--a.h;(a.f||a.g)&&setTimeout(function(){var a=e||null,m=d||null||{};if(0===c.length&&f)L(b.a);else{b.f+=c.length;f&&(b.j=f);var h,l=[];for(h=0;h<c.length;h++){var k=c[h],n=m[k.c],r=b.a,x=k;r.g&&w(r.f,[r.a.c("wf",x.c,J(x).toString(),"loading")]);K(r,"fontloading",x);r=null;if(null===X)if(window.FontFace){var x=/Gecko.*Firefox\/(\d+)/.exec(window.navigator.userAgent),xa=/OS X.*Version\/10\..*Safari/.exec(window.navigator.userAgent)&&/Apple/.exec(window.navigator.vendor);
|
10
|
+
X=x?42<parseInt(x[1],10):xa?!1:!0}else X=!1;X?r=new P(p(b.g,b),p(b.h,b),b.c,k,b.s,n):r=new Q(p(b.g,b),p(b.h,b),b.c,k,b.s,a,n);l.push(r)}for(h=0;h<l.length;h++)l[h].start()}},0)}function pa(a,b,c){var d=[],e=c.timeout;ia(b);var d=ka(a.a,c,a.c),f=new W(a.c,b,e);a.h=d.length;b=0;for(c=d.length;b<c;b++)d[b].load(function(b,d,c){qa(a,f,b,d,c)})};function ra(a,b){this.c=a;this.a=b}
|
11
|
+
ra.prototype.load=function(a){function b(){if(f["__mti_fntLst"+d]){var c=f["__mti_fntLst"+d](),e=[],h;if(c)for(var l=0;l<c.length;l++){var k=c[l].fontfamily;void 0!=c[l].fontStyle&&void 0!=c[l].fontWeight?(h=c[l].fontStyle+c[l].fontWeight,e.push(new G(k,h))):e.push(new G(k))}a(e)}else setTimeout(function(){b()},50)}var c=this,d=c.a.projectId,e=c.a.version;if(d){var f=c.c.o;A(this.c,(c.a.api||"https://fast.fonts.net/jsapi")+"/"+d+".js"+(e?"?v="+e:""),function(e){e?a([]):(f["__MonotypeConfiguration__"+
|
12
|
+
d]=function(){return c.a},b())}).id="__MonotypeAPIScript__"+d}else a([])};function sa(a,b){this.c=a;this.a=b}sa.prototype.load=function(a){var b,c,d=this.a.urls||[],e=this.a.families||[],f=this.a.testStrings||{},g=new B;b=0;for(c=d.length;b<c;b++)z(this.c,d[b],C(g));var m=[];b=0;for(c=e.length;b<c;b++)if(d=e[b].split(":"),d[1])for(var h=d[1].split(","),l=0;l<h.length;l+=1)m.push(new G(d[0],h[l]));else m.push(new G(d[0]));E(g,function(){a(m,f)})};function ta(a,b){a?this.c=a:this.c=ua;this.a=[];this.f=[];this.g=b||""}var ua="https://fonts.googleapis.com/css";function va(a,b){for(var c=b.length,d=0;d<c;d++){var e=b[d].split(":");3==e.length&&a.f.push(e.pop());var f="";2==e.length&&""!=e[1]&&(f=":");a.a.push(e.join(f))}}
|
13
|
+
function wa(a){if(0==a.a.length)throw Error("No fonts to load!");if(-1!=a.c.indexOf("kit="))return a.c;for(var b=a.a.length,c=[],d=0;d<b;d++)c.push(a.a[d].replace(/ /g,"+"));b=a.c+"?family="+c.join("%7C");0<a.f.length&&(b+="&subset="+a.f.join(","));0<a.g.length&&(b+="&text="+encodeURIComponent(a.g));return b};function ya(a){this.f=a;this.a=[];this.c={}}
|
14
|
+
var za={latin:"BESbswy","latin-ext":"\u00e7\u00f6\u00fc\u011f\u015f",cyrillic:"\u0439\u044f\u0416",greek:"\u03b1\u03b2\u03a3",khmer:"\u1780\u1781\u1782",Hanuman:"\u1780\u1781\u1782"},Aa={thin:"1",extralight:"2","extra-light":"2",ultralight:"2","ultra-light":"2",light:"3",regular:"4",book:"4",medium:"5","semi-bold":"6",semibold:"6","demi-bold":"6",demibold:"6",bold:"7","extra-bold":"8",extrabold:"8","ultra-bold":"8",ultrabold:"8",black:"9",heavy:"9",l:"3",r:"4",b:"7"},Ba={i:"i",italic:"i",n:"n",normal:"n"},
|
15
|
+
Ca=/^(thin|(?:(?:extra|ultra)-?)?light|regular|book|medium|(?:(?:semi|demi|extra|ultra)-?)?bold|black|heavy|l|r|b|[1-9]00)?(n|i|normal|italic)?$/;
|
16
|
+
function Da(a){for(var b=a.f.length,c=0;c<b;c++){var d=a.f[c].split(":"),e=d[0].replace(/\+/g," "),f=["n4"];if(2<=d.length){var g;var m=d[1];g=[];if(m)for(var m=m.split(","),h=m.length,l=0;l<h;l++){var k;k=m[l];if(k.match(/^[\w-]+$/)){var n=Ca.exec(k.toLowerCase());if(null==n)k="";else{k=n[2];k=null==k||""==k?"n":Ba[k];n=n[1];if(null==n||""==n)n="4";else var r=Aa[n],n=r?r:isNaN(n)?"4":n.substr(0,1);k=[k,n].join("")}}else k="";k&&g.push(k)}0<g.length&&(f=g);3==d.length&&(d=d[2],g=[],d=d?d.split(","):
|
17
|
+
g,0<d.length&&(d=za[d[0]])&&(a.c[e]=d))}a.c[e]||(d=za[e])&&(a.c[e]=d);for(d=0;d<f.length;d+=1)a.a.push(new G(e,f[d]))}};function Ea(a,b){this.c=a;this.a=b}var Fa={Arimo:!0,Cousine:!0,Tinos:!0};Ea.prototype.load=function(a){var b=new B,c=this.c,d=new ta(this.a.api,this.a.text),e=this.a.families;va(d,e);var f=new ya(e);Da(f);z(c,wa(d),C(b));E(b,function(){a(f.a,f.c,Fa)})};function Ga(a,b){this.c=a;this.a=b}Ga.prototype.load=function(a){var b=this.a.id,c=this.c.o;b?A(this.c,(this.a.api||"https://use.typekit.net")+"/"+b+".js",function(b){if(b)a([]);else if(c.Typekit&&c.Typekit.config&&c.Typekit.config.fn){b=c.Typekit.config.fn;for(var e=[],f=0;f<b.length;f+=2)for(var g=b[f],m=b[f+1],h=0;h<m.length;h++)e.push(new G(g,m[h]));try{c.Typekit.load({events:!1,classes:!1,async:!0})}catch(l){}a(e)}},2E3):a([])};function Ha(a,b){this.c=a;this.f=b;this.a=[]}Ha.prototype.load=function(a){var b=this.f.id,c=this.c.o,d=this;b?(c.__webfontfontdeckmodule__||(c.__webfontfontdeckmodule__={}),c.__webfontfontdeckmodule__[b]=function(b,c){for(var g=0,m=c.fonts.length;g<m;++g){var h=c.fonts[g];d.a.push(new G(h.name,ga("font-weight:"+h.weight+";font-style:"+h.style)))}a(d.a)},A(this.c,(this.f.api||"https://f.fontdeck.com/s/css/js/")+ea(this.c)+"/"+b+".js",function(b){b&&a([])})):a([])};var Y=new oa(window);Y.a.c.custom=function(a,b){return new sa(b,a)};Y.a.c.fontdeck=function(a,b){return new Ha(b,a)};Y.a.c.monotype=function(a,b){return new ra(b,a)};Y.a.c.typekit=function(a,b){return new Ga(b,a)};Y.a.c.google=function(a,b){return new Ea(b,a)};var Z={load:p(Y.load,Y)};"function"===typeof define&&define.amd?define(function(){return Z}):"undefined"!==typeof module&&module.exports?module.exports=Z:(window.WebFont=Z,window.WebFontConfig&&Y.load(window.WebFontConfig));}());
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webfontloader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.28
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Carver
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2017-05-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -224,7 +224,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
224
224
|
version: '0'
|
225
225
|
requirements: []
|
226
226
|
rubyforge_project:
|
227
|
-
rubygems_version: 2.
|
227
|
+
rubygems_version: 2.4.5.1
|
228
228
|
signing_key:
|
229
229
|
specification_version: 2
|
230
230
|
summary: WebFont Loader gives you added control when using linked fonts via @font-face.
|