mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Prevent readCmapTable
from failing if the cmap
is missing in TrueType fonts
Fixes http://arrow.dit.ie/cgi/viewcontent.cgi?article=1000&context=aaschadpoth#page=3.
This commit is contained in:
parent
1280b7b76b
commit
ff64ef0243
4 changed files with 17 additions and 0 deletions
|
@ -3226,6 +3226,15 @@ var Font = (function FontClosure() {
|
|||
* PDF spec
|
||||
*/
|
||||
function readCmapTable(cmap, font, isSymbolicFont, hasEncoding) {
|
||||
if (!cmap) {
|
||||
warn('No cmap table available.');
|
||||
return {
|
||||
platformId: -1,
|
||||
encodingId: -1,
|
||||
mappings: [],
|
||||
hasShortCmap: false
|
||||
};
|
||||
}
|
||||
var segment;
|
||||
var start = (font.start ? font.start : 0) + cmap.offset;
|
||||
font.pos = start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue