From: Chris Jones Date: Mon, 9 May 2011 20:18:19 +0000 (-0500) Subject: Restore font lookup and setting X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=82f49501c3f8dd8948b019ba46c4428c0507c74e;p=pdf.js.git Restore font lookup and setting --- diff --git a/pdf.js b/pdf.js index ad02f30..287ccd2 100644 --- a/pdf.js +++ b/pdf.js @@ -984,6 +984,7 @@ var Interpreter = (function() { this.res = resources; this.catalog = catalog; this.gfx = gfx; + var env = this; this.map = { // Graphics state w: gfx.setLineWidth, @@ -1008,7 +1009,10 @@ var Interpreter = (function() { // Text BT: gfx.beginText, ET: gfx.endText, - Tf: gfx.setFont, + Tf: function(fontRef, size) { + var font = env.res.Font[fontRef.name] + gfx.setFont(font, size); + }, Td: gfx.moveText, Tj: gfx.showText,