]> git.parisson.com Git - pdf.js.git/commitdiff
Fix a small bug about how 'W' widths array is parsed
authorVivien Nicolas <21@vingtetun.org>
Sat, 10 Sep 2011 12:27:04 +0000 (14:27 +0200)
committerVivien Nicolas <21@vingtetun.org>
Sat, 10 Sep 2011 12:27:04 +0000 (14:27 +0200)
pdf.js

diff --git a/pdf.js b/pdf.js
index d5a651d249d03eef6b8180b063dd0346be21d6cc..18f93dcf8a8a3081cfe339633227aff96802e3c6 100644 (file)
--- 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) {