From 3c5dedf60d772dae5b733b5e96dfe0a72bfac39c Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Sat, 24 May 2014 11:29:52 +0200 Subject: [PATCH] Prevent font error when no preferred cmap table is found (workaround for issue 4800) --- src/core/fonts.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/fonts.js b/src/core/fonts.js index 205fc95c4..1e18e23ad 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2971,7 +2971,12 @@ var Font = (function FontClosure() { if (!potentialTable) { warn('Could not find a preferred cmap table.'); - return []; + return { + platformId: -1, + encodingId: -1, + mappings: [], + hasShortCmap: false + }; } font.pos = start + potentialTable.offset;