Use timeout for font ready callback to avoid intermittent chrome failures.

This commit is contained in:
Brendan Dahl 2012-08-06 08:51:20 -07:00
parent 485f8ebe27
commit 69eca3c50f

View File

@ -418,7 +418,8 @@ var FontLoader = {
document.documentElement.removeEventListener(
'pdfjsFontLoad', checkFontsLoaded, false);
callback();
// Use timeout to fix chrome intermittent failures on font loading.
setTimeout(callback, 0);
return true;
}