clarify API a bit and hand in xref and resources to ease translation
This commit is contained in:
parent
cf4bca7813
commit
02df7f8e58
6
pdf.js
6
pdf.js
@ -1683,8 +1683,8 @@ var CanvasGraphics = (function() {
|
|||||||
const EO_CLIP = {};
|
const EO_CLIP = {};
|
||||||
|
|
||||||
constructor.prototype = {
|
constructor.prototype = {
|
||||||
translateFont: function(fontDict) {
|
translateFont: function(fontDict, xref, resources) {
|
||||||
return fontDict;
|
return "translated";
|
||||||
},
|
},
|
||||||
|
|
||||||
beginDrawing: function(mediaBox) {
|
beginDrawing: function(mediaBox) {
|
||||||
@ -1758,7 +1758,7 @@ var CanvasGraphics = (function() {
|
|||||||
var font = xref.fetchIfRef(fontRes.get(args[0].name));
|
var font = xref.fetchIfRef(fontRes.get(args[0].name));
|
||||||
assertWellFormed(IsDict(font));
|
assertWellFormed(IsDict(font));
|
||||||
if (!font.translated) {
|
if (!font.translated) {
|
||||||
font.translated = this.translateFont(font);
|
font.translated = this.translateFont(font, xref, resources);
|
||||||
if (fonts && font.translated) {
|
if (fonts && font.translated) {
|
||||||
// keep track of each font we translated so the caller can
|
// keep track of each font we translated so the caller can
|
||||||
// load them asynchronously before calling display on a page
|
// load them asynchronously before calling display on a page
|
||||||
|
Loading…
x
Reference in New Issue
Block a user