diff --git a/PDFFont.js b/PDFFont.js index 9318fd3a1..34fb28fc4 100644 --- a/PDFFont.js +++ b/PDFFont.js @@ -1142,9 +1142,9 @@ var CFF = function(aFontName, aFontFile) { var length1 = aFontFile.dict.get("Length1"); var length2 = aFontFile.dict.get("Length2"); - var pos = aFontFile.pos; - var ASCIIStream = aFontFile.makeSubStream(pos, length1, aFontFile.dict); - var binaryStream = aFontFile.makeSubStream(pos + length1, length2, aFontFile.dict); + + var ASCIIStream = new Stream(aFontFile.getBytes(length1)); + var binaryStream = new Stream(aFontFile.getBytes(length2)); this.parser = new Type1Parser(ASCIIStream, binaryStream); var fontName = this.parser.parse(); diff --git a/pdf.js b/pdf.js index a9c9bf020..8b06f5582 100644 --- a/pdf.js +++ b/pdf.js @@ -1848,7 +1848,6 @@ var CanvasGraphics = (function() { } this.current.fontSize = size; - TODO("using hard-coded font for testing"); this.ctx.font = this.current.fontSize +'px "' + fontName + '"'; }, moveText: function (x, y) {