Browse Source

Need to use font.translated.name as unique identifier

Julian Viereck 14 years ago
parent
commit
e9f4a3d8ee
  1. 9
      pdf.js

9
pdf.js

@ -4212,8 +4212,6 @@ var PartialEvaluator = (function() { @@ -4212,8 +4212,6 @@ var PartialEvaluator = (function() {
} else if (cmd == 'Tf') { // eagerly collect all fonts
var fontName = args[0].name;
// Check if this font is known already and process it otherwise.
if (!FontsMap[fontName]) {
var fontRes = resources.get('Font');
if (fontRes) {
fontRes = xref.fetchIfRef(fontRes);
@ -4225,10 +4223,13 @@ var PartialEvaluator = (function() { @@ -4225,10 +4223,13 @@ var PartialEvaluator = (function() {
// keep track of each font we translated so the caller can
// load them asynchronously before calling display on a page
fonts.push(font.translated);
FontsMap[fontName] = font;
}
FontsMap[font.translated.name] = font;
}
}
args[0].name = font.translated.name;
} else {
// TODO: TOASK: Is it possible to get here? If so, what does
// args[0].name should be like???
}
}

Loading…
Cancel
Save