Get rid of the TrueType class, adapt the code to conventions and new code

This commit is contained in:
Vivien Nicolas 2011-06-21 06:49:59 +02:00
parent aa7e1ac6d6
commit 2315131b90
2 changed files with 647 additions and 869 deletions

1513
fonts.js

File diff suppressed because it is too large Load Diff

3
pdf.js
View File

@ -80,6 +80,7 @@ var Stream = (function() {
getBytes: function(length) { getBytes: function(length) {
var bytes = this.bytes; var bytes = this.bytes;
var pos = this.pos; var pos = this.pos;
var end = pos + length; var end = pos + length;
var strEnd = this.end; var strEnd = this.end;
if (!end || end > strEnd) if (!end || end > strEnd)
@ -2198,7 +2199,7 @@ var CanvasGraphics = (function() {
var tokens = []; var tokens = [];
var token = ""; var token = "";
var buffer = cmapObj.ensureBuffer(); var buffer = cmapObj.ensureBuffer ? cmapObj.ensureBuffer() : cmapObj;
var cmap = cmapObj.getBytes(buffer.byteLength); var cmap = cmapObj.getBytes(buffer.byteLength);
for (var i =0; i < cmap.length; i++) { for (var i =0; i < cmap.length; i++) {
var byte = cmap[i]; var byte = cmap[i];