From c3c72948b9c0bed107b35855052544ba888dda77 Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Fri, 25 Jul 2014 15:28:31 +0200 Subject: [PATCH] Stop including cidmaps.js In https://github.com/mozilla/pdf.js/commit/b5b94a4af389ef387570cf22662d9fc6bd41417a, i.e. PR #4259, we stopped using cidmaps.js. Despite that, it's still included when PDF.js is built. At almost 0.5 MB (and approx. 7000 lines), this is currently the single largest file in the codebase. Including such a large file in the builds, when it is not actually used, seems extremely wasteful; hence this patch. --- src/core/fonts.js | 11 +++++------ src/worker_loader.js | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/src/core/fonts.js b/src/core/fonts.js index 6708874d0..4465f57f2 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -14,12 +14,11 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -/* globals assert, bytesToString, CIDToUnicodeMaps, error, ExpertCharset, - ExpertSubsetCharset, FileReaderSync, GlyphsUnicode, info, isArray, - isNum, ISOAdobeCharset, Stream, stringToArray, stringToBytes, - string32, TextDecoder, warn, Lexer, Util, FONT_IDENTITY_MATRIX, - FontRendererFactory, shadow, isString, IdentityCMap, Name, - CMapFactory, PDFJS, readUint32, FontType */ +/* globals FONT_IDENTITY_MATRIX, FontType, warn, GlyphsUnicode, error, string32, + readUint32, stringToArray, Stream, FontRendererFactory, shadow, + bytesToString, info, assert, IdentityCMap, Name, CMapFactory, PDFJS, + isNum, Lexer, isArray, ISOAdobeCharset, ExpertCharset, + ExpertSubsetCharset, Util */ 'use strict'; diff --git a/src/worker_loader.js b/src/worker_loader.js index 627aaec3a..21f05bd19 100644 --- a/src/worker_loader.js +++ b/src/worker_loader.js @@ -31,7 +31,6 @@ var otherFiles = [ 'core/core.js', 'core/obj.js', 'core/charsets.js', - 'core/cidmaps.js', 'core/annotation.js', 'core/function.js', 'core/colorspace.js',