Skip to content

Commit

Permalink
Merge pull request #4835 from Snuffleupagus/issue-4800
Browse files Browse the repository at this point in the history
Prevent font error when no preferred cmap table is found (workaround for issue 4800)
  • Loading branch information
yurydelendik committed Jun 2, 2014
2 parents 3acf570 + 3c5dedf commit 2449142
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/core/fonts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2449142

Please sign in to comment.