diff --git a/bower.json b/bower.json index e1bf3162c..b599f435c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.5.444", + "version": "1.5.446", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 52e823c44..12672a98a 100644 --- a/build/pdf.combined.js +++ b/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.444'; -var pdfjsBuild = 'b112f9f'; +var pdfjsVersion = '1.5.446'; +var pdfjsBuild = '1fae435'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -34399,7 +34399,10 @@ var Font = (function FontClosure() { charCodeToGlyphId[charCode] = glyphId; } }); - if (dupFirstEntry) { + if (dupFirstEntry && (isCidToGidMapEmpty || !charCodeToGlyphId[0])) { + // We don't duplicate the first entry in the `charCodeToGlyphId` map + // if the font has a `CIDToGIDMap` which has already mapped the first + // entry to a non-zero `glyphId` (fixes issue7544.pdf). charCodeToGlyphId[0] = numGlyphs - 1; } } else { diff --git a/build/pdf.js b/build/pdf.js index c0c55cf22..e6541b554 100644 --- a/build/pdf.js +++ b/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.444'; -var pdfjsBuild = 'b112f9f'; +var pdfjsVersion = '1.5.446'; +var pdfjsBuild = '1fae435'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? diff --git a/build/pdf.worker.js b/build/pdf.worker.js index ab194b4a2..25f59fd50 100644 --- a/build/pdf.worker.js +++ b/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.444'; -var pdfjsBuild = 'b112f9f'; +var pdfjsVersion = '1.5.446'; +var pdfjsBuild = '1fae435'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -30116,7 +30116,10 @@ var Font = (function FontClosure() { charCodeToGlyphId[charCode] = glyphId; } }); - if (dupFirstEntry) { + if (dupFirstEntry && (isCidToGidMapEmpty || !charCodeToGlyphId[0])) { + // We don't duplicate the first entry in the `charCodeToGlyphId` map + // if the font has a `CIDToGIDMap` which has already mapped the first + // entry to a non-zero `glyphId` (fixes issue7544.pdf). charCodeToGlyphId[0] = numGlyphs - 1; } } else { diff --git a/package.json b/package.json index 5fbbf984f..78444291f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.5.444", + "version": "1.5.446", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [