浏览代码

PDF.js version 1.5.479 - See mozilla/pdf.js@15e1ae4e3f70e90e9f9df12a5dff2d9d386cd0f6

Pdf Bot 8 年之前
父节点
当前提交
8b4fd6d28b
共有 5 个文件被更改,包括 24 次插入10 次删除
  1. 1 1
      bower.json
  2. 10 3
      build/pdf.combined.js
  3. 2 2
      build/pdf.js
  4. 10 3
      build/pdf.worker.js
  5. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.5.477",
+  "version": "1.5.479",
   "main": [
     "build/pdf.js",
     "build/pdf.worker.js"

+ 10 - 3
build/pdf.combined.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.477';
-var pdfjsBuild = '9e927de';
+var pdfjsVersion = '1.5.479';
+var pdfjsBuild = '15e1ae4';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -35394,7 +35394,14 @@ var Type1Font = (function Type1FontClosure() {
       var charStringsIndex = new CFFIndex();
       charStringsIndex.add([0x8B, 0x0E]); // .notdef
       for (i = 0; i < count; i++) {
-        charStringsIndex.add(glyphs[i]);
+        var glyph = glyphs[i];
+        // If the CharString outline is empty, replace it with .notdef to
+        // prevent OTS from rejecting the font (fixes bug1252420.pdf).
+        if (glyph.length === 0) {
+          charStringsIndex.add([0x8B, 0x0E]); // .notdef
+          continue;
+        }
+        charStringsIndex.add(glyph);
       }
       cff.charStrings = charStringsIndex;
 

+ 2 - 2
build/pdf.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.477';
-var pdfjsBuild = '9e927de';
+var pdfjsVersion = '1.5.479';
+var pdfjsBuild = '15e1ae4';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?

+ 10 - 3
build/pdf.worker.js

@@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
   // Use strict in our context only - users might not want it
   'use strict';
 
-var pdfjsVersion = '1.5.477';
-var pdfjsBuild = '9e927de';
+var pdfjsVersion = '1.5.479';
+var pdfjsBuild = '15e1ae4';
 
   var pdfjsFilePath =
     typeof document !== 'undefined' && document.currentScript ?
@@ -31080,7 +31080,14 @@ var Type1Font = (function Type1FontClosure() {
       var charStringsIndex = new CFFIndex();
       charStringsIndex.add([0x8B, 0x0E]); // .notdef
       for (i = 0; i < count; i++) {
-        charStringsIndex.add(glyphs[i]);
+        var glyph = glyphs[i];
+        // If the CharString outline is empty, replace it with .notdef to
+        // prevent OTS from rejecting the font (fixes bug1252420.pdf).
+        if (glyph.length === 0) {
+          charStringsIndex.add([0x8B, 0x0E]); // .notdef
+          continue;
+        }
+        charStringsIndex.add(glyph);
       }
       cff.charStrings = charStringsIndex;
 

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "pdfjs-dist",
-  "version": "1.5.477",
+  "version": "1.5.479",
   "main": "build/pdf.js",
   "description": "Generic build of Mozilla's PDF.js library.",
   "keywords": [