Merge pull request #4835 from Snuffleupagus/issue-4800

Prevent font error when no preferred cmap table is found (workaround for issue 4800)
This commit is contained in:
Yury Delendik 2014-06-02 14:42:58 -05:00
commit 2449142fc3

View File

@ -2971,7 +2971,12 @@ var Font = (function FontClosure() {
if (!potentialTable) { if (!potentialTable) {
warn('Could not find a preferred cmap table.'); warn('Could not find a preferred cmap table.');
return []; return {
platformId: -1,
encodingId: -1,
mappings: [],
hasShortCmap: false
};
} }
font.pos = start + potentialTable.offset; font.pos = start + potentialTable.offset;