]> git.parisson.com Git - pdf.js.git/commitdiff
Merge with upstream, reverse changeset 4e24288 since it brokes TTF on linux
authorVivien Nicolas <21@vingtetun.org>
Wed, 29 Jun 2011 00:58:51 +0000 (02:58 +0200)
committerVivien Nicolas <21@vingtetun.org>
Wed, 29 Jun 2011 00:58:51 +0000 (02:58 +0200)
1  2 
fonts.js
pdf.js

diff --cc fonts.js
index 4ac5935b5c26755e5f984766c4aedeebc88cafab,7c30dfc7e130d9024a1c64cf4278a8140f874048..19d16cbedfdd935d34997c3772ccabb8ded06342
+++ b/fonts.js
@@@ -33,8 -32,6 +33,8 @@@ var kDisableFonts = false
   * TODO Add the standard fourteen Type1 fonts list by default
   *      http://cgit.freedesktop.org/poppler/poppler/tree/poppler/GfxFont.cc#n65
   */
- var kScalePrecision = 100;
 +
++var kScalePrecision = 40;
  var Fonts = {
    _active: null,
  
diff --cc pdf.js
index f09ccd866f1796a48a58b4913bf8d8f5f359b3ef,bc54fd8ab531278bbc2a0a9458271c2e55f704ae..33a21e38cfcf7a52969f2130703beb12776f4804
--- 1/pdf.js
--- 2/pdf.js
+++ b/pdf.js
@@@ -633,7 -641,7 +641,7 @@@ var PredictorStream = (function() 
          var pixBytes = this.pixBytes = (colors * bits + 7) >> 3;
          // add an extra pixByte to represent the pixel left of column 0
          var rowBytes = this.rowBytes = (columns * colors * bits + 7) >> 3;
--        
++
          DecodeStream.call(this);
          return this;
      }
@@@ -2808,9 -3817,11 +3818,13 @@@ var CanvasGraphics = (function() 
                  return;
              }
  
 +            this.current.fontName = fontName;
              this.current.fontSize = size;
-             this.ctx.font = this.current.fontSize + 'px "' + this.current.fontName + '"';
 -            this.ctx.font = this.current.fontSize +'px "' + fontName + '", Symbol';
++
++            this.ctx.font = this.current.fontSize + 'px "' + fontName + '"';
+             if (this.ctx.$setFont) {
+               this.ctx.$setFont(fontName);
+             }
          },
          setTextRenderingMode: function(mode) {
              TODO("text rendering mode");