From: Vivien Nicolas <21@vingtetun.org> Date: Wed, 29 Jun 2011 00:58:51 +0000 (+0200) Subject: Merge with upstream, reverse changeset 4e24288 since it brokes TTF on linux X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=dd923d5aea7004c5c0f11a50d75e8f998703f51b;p=pdf.js.git Merge with upstream, reverse changeset 4e24288 since it brokes TTF on linux --- dd923d5aea7004c5c0f11a50d75e8f998703f51b diff --cc fonts.js index 4ac5935,7c30dfc..19d16cb --- a/fonts.js +++ 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 f09ccd8,bc54fd8..33a21e3 --- a/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");