Refactors FontLoader to group fonts per document.

This commit is contained in:
Yury Delendik 2015-10-27 17:48:10 -05:00
parent 09772e1e15
commit 06c1904675
6 changed files with 117 additions and 98 deletions

View file

@ -529,7 +529,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
// Keep track of each font we translated so the caller can
// load them asynchronously before calling display on a page.
font.loadedName = 'g_font_' + (fontRefIsDict ?
font.loadedName = 'g_' + this.pdfManager.docId + '_f' + (fontRefIsDict ?
fontName.replace(/\W/g, '') : fontID);
font.translated = fontCapability.promise;