|
|
|
@ -118,6 +118,10 @@ FontLoader.prototype = {
@@ -118,6 +118,10 @@ FontLoader.prototype = {
|
|
|
|
|
warn('Failed to load font "' + nativeFontFace.family + '": ' + e); |
|
|
|
|
}); |
|
|
|
|
}; |
|
|
|
|
// Firefox Font Loading API does not work with mozPrintCallback --
|
|
|
|
|
// disabling it in this case.
|
|
|
|
|
var isFontLoadingAPISupported = FontLoader.isFontLoadingAPISupported && |
|
|
|
|
!FontLoader.isSyncFontLoadingSupported; |
|
|
|
|
for (var i = 0, ii = fonts.length; i < ii; i++) { |
|
|
|
|
var font = fonts[i]; |
|
|
|
|
|
|
|
|
@ -128,7 +132,7 @@ FontLoader.prototype = {
@@ -128,7 +132,7 @@ FontLoader.prototype = {
|
|
|
|
|
} |
|
|
|
|
font.attached = true; |
|
|
|
|
|
|
|
|
|
if (FontLoader.isFontLoadingAPISupported) { |
|
|
|
|
if (isFontLoadingAPISupported) { |
|
|
|
|
var nativeFontFace = font.createNativeFontFace(); |
|
|
|
|
if (nativeFontFace) { |
|
|
|
|
this.addNativeFontFace(nativeFontFace); |
|
|
|
@ -145,7 +149,7 @@ FontLoader.prototype = {
@@ -145,7 +149,7 @@ FontLoader.prototype = {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
var request = this.queueLoadingCallback(callback); |
|
|
|
|
if (FontLoader.isFontLoadingAPISupported) { |
|
|
|
|
if (isFontLoadingAPISupported) { |
|
|
|
|
Promise.all(fontLoadPromises).then(function() { |
|
|
|
|
request.complete(); |
|
|
|
|
}); |
|
|
|
|