Browse Source

Do not use makeSubStream in the CFF constructor

Vivien Nicolas 14 years ago
parent
commit
b7449f3bcc
  1. 6
      PDFFont.js
  2. 1
      pdf.js

6
PDFFont.js

@ -1142,9 +1142,9 @@ var CFF = function(aFontName, aFontFile) {
var length1 = aFontFile.dict.get("Length1"); var length1 = aFontFile.dict.get("Length1");
var length2 = aFontFile.dict.get("Length2"); var length2 = aFontFile.dict.get("Length2");
var pos = aFontFile.pos;
var ASCIIStream = aFontFile.makeSubStream(pos, length1, aFontFile.dict); var ASCIIStream = new Stream(aFontFile.getBytes(length1));
var binaryStream = aFontFile.makeSubStream(pos + length1, length2, aFontFile.dict); var binaryStream = new Stream(aFontFile.getBytes(length2));
this.parser = new Type1Parser(ASCIIStream, binaryStream); this.parser = new Type1Parser(ASCIIStream, binaryStream);
var fontName = this.parser.parse(); var fontName = this.parser.parse();

1
pdf.js

@ -1848,7 +1848,6 @@ var CanvasGraphics = (function() {
} }
this.current.fontSize = size; this.current.fontSize = size;
TODO("using hard-coded font for testing");
this.ctx.font = this.current.fontSize +'px "' + fontName + '"'; this.ctx.font = this.current.fontSize +'px "' + fontName + '"';
}, },
moveText: function (x, y) { moveText: function (x, y) {

Loading…
Cancel
Save