1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Ignoring glyphs without points

This commit is contained in:
Yury Delendik 2013-11-02 17:07:13 -05:00
parent 1ce8afc23c
commit 93076ced03
4 changed files with 11 additions and 0 deletions

View file

@ -3164,6 +3164,10 @@ var Font = (function FontClosure() {
coordinatesLength += repeat * xyLength;
}
}
// glyph without coordinates will be rejected
if (coordinatesLength === 0) {
return 0;
}
var glyphDataLength = j + coordinatesLength;
if (glyphDataLength > glyf.length) {
// not enough data for coordinates