fix some bugs

This commit is contained in:
Chris Jones 2011-07-04 23:28:44 -04:00
parent fe09c1852c
commit 122d168b51
3 changed files with 4 additions and 4 deletions

View File

@ -1807,8 +1807,8 @@ CFF.prototype = {
var data = var data =
"\x8b\x14" + // defaultWidth "\x8b\x14" + // defaultWidth
"\x8b\x15" + // nominalWidth "\x8b\x15" + // nominalWidth
self.encodeNumber(properties.stdHW) + "\x0a" + // StdHW self.encodeNumber(properties.stdHW || 0) + "\x0a" + // StdHW
self.encodeNumber(properties.stdVW) + "\x0b"; // StdVW self.encodeNumber(properties.stdVW || 0) + "\x0b"; // StdVW
var stemH = properties.stemSnapH; var stemH = properties.stemSnapH;
for (var i = 0; i < stemH.length; i++) for (var i = 0; i < stemH.length; i++)

2
pdf.js
View File

@ -3875,7 +3875,7 @@ var CanvasGraphics = (function() {
this.ctx.translate(this.current.x, -1 * this.current.y); this.ctx.translate(this.current.x, -1 * this.current.y);
var font = Fonts.lookup(this.current.fontName); var font = Fonts.lookup(this.current.fontName);
if (font) if (font && font.properties.textMatrix)
this.ctx.transform.apply(this.ctx, font.properties.textMatrix); this.ctx.transform.apply(this.ctx, font.properties.textMatrix);
this.ctx.fillText(text, 0, 0); this.ctx.fillText(text, 0, 0);

View File

@ -152,7 +152,7 @@ function snapshotCurrentPage(gfx, page, task, failure) {
} }
sendTaskResult(canvas.toDataURL("image/png"), task, failure); sendTaskResult(canvas.toDataURL("image/png"), task, failure);
log("done"+ (failure ? " (failed!)" : "") +"\n"); log("done"+ (failure ? " (failed!: "+ failure +")" : "") +"\n");
// Set up the next request // Set up the next request
backoff = (inFlightRequests > 0) ? inFlightRequests * 10 : 0; backoff = (inFlightRequests > 0) ? inFlightRequests * 10 : 0;