Cleaning up fonts when viewer is idle for some time

This commit is contained in:
Yury Delendik 2013-11-14 13:43:38 -08:00
parent 945e370d4f
commit e712c4136a
9 changed files with 93 additions and 9 deletions

View file

@ -33,6 +33,12 @@ var FontLoader = {
var styleSheet = styleElement.sheet;
styleSheet.insertRule(rule, styleSheet.cssRules.length);
},
clear: function fontLoaderClear() {
var styleElement = document.getElementById('PDFJS_FONT_STYLE_TAG');
if (styleElement) {
styleElement.parentNode.removeChild(styleElement);
}
},
//#if !(MOZCENTRAL)
get loadTestFont() {
// This is a CFF font with 1 glyph for '.' that fills its entire width and