typekit / webfontloader

Web Font Loader gives you added control when using linked fonts via @font-face.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

With switch to `NativeFontWatchRunner`, not all events are fired for all `load` calls

jtsternberg opened this issue · comments

With version ≤ 1.6.7, all callbacks would be fired for each WebFont.load() request. E.g. two alerts would happen in this scenario:

WebFont.load({
	active : function() {
		alert('WebFont.load active 1', arguments);
	},
	inactive : function() {
		alert('WebFont.load inactive 1', arguments);
	},
	custom: {
		families : [ 'Font Awesome:400' ],
		urls     : [ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css' ]
	}
})
WebFont.load({
	active : function() {
		alert('WebFont.load active 2', arguments);
	},
	inactive : function() {
		alert('WebFont.load inactive 2', arguments);
	},
	custom: {
		families : [ 'Font Awesome:400' ],
		urls     : [ 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.css' ]
	}
})

But with ≥ 1.6.8, the callbacks for only one of the load() calls are fired, so only one alert in the above scenario.

See for yourself:

Feels like maybe #152 is related.