Skip to content

Commit

Permalink
adjust font loading timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
wissenbach committed Jul 6, 2018
1 parent c04b341 commit 0a30892
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions svg_rendering/page/js-gen/loadwebfonts.js
Expand Up @@ -27,6 +27,9 @@ if (window.Faust === undefined) {

(function (Faust) {

// time out waiting for web fonts to be loaded in ms
var FONT_LOAD_TIMEOUT = 5000;

Fonts = {};
Fonts.active = function (callback) {

Expand All @@ -38,8 +41,8 @@ if (window.Faust === undefined) {
// we don not need to specify urls as they are specified in the css files
urls: ['/css/webfonts.css']
},
// do not time out if font can't be loaded
timeout: 10, //Number.MAX_VALUE,

timeout: FONT_LOAD_TIMEOUT,
active: function () {
// if we made it this far without 'fontinactive' occurring, then all
// fonts have been loaded
Expand Down

0 comments on commit 0a30892

Please sign in to comment.