From: Vivien Nicolas <21@vingtetun.org> Date: Sat, 10 Sep 2011 12:27:04 +0000 (+0200) Subject: Fix a small bug about how 'W' widths array is parsed X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=001ca071f03605c1b262c6cbe52793b142a12ace;p=pdf.js.git Fix a small bug about how 'W' widths array is parsed --- diff --git a/pdf.js b/pdf.js index d5a651d..18f93dc 100644 --- a/pdf.js +++ b/pdf.js @@ -4212,8 +4212,9 @@ var PartialEvaluator = (function() { glyphsWidths[start++] = code[j]; start = 0; } else if (start) { + var width = widths[++i]; for (var j = start; j <= code; j++) - glyphsWidths[j] = widths[++i]; + glyphsWidths[j] = width; start = 0; } else { start = code; @@ -4614,7 +4615,7 @@ function ScratchCanvas(width, height) { } var CanvasGraphics = (function() { - var kScalePrecision = 50; + var kScalePrecision = 50.0; var kRasterizerMin = 14; function constructor(canvasCtx, imageCanvas) {