mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Do not use makeSubStream in the CFF constructor
This commit is contained in:
parent
f9e3607601
commit
c03dd98075
2 changed files with 3 additions and 4 deletions
|
@ -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
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…
Add table
Add a link
Reference in a new issue