Prevent font error when no preferred cmap table is found (workaround for issue 4800)

This commit is contained in:
Jonas Jenwald 2014-05-24 11:29:52 +02:00
parent 9664ce8e8d
commit 3c5dedf60d

View File

@ -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;