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

Merge pull request #13376 from calixteman/6132

Replace command with not enough args by an endchar in CFF font
This commit is contained in:
Brendan Dahl 2021-06-04 14:00:51 -07:00 committed by GitHub
commit 6255c2a8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 0 deletions

View file

@ -632,6 +632,14 @@ const CFFParser = (function CFFParserClosure() {
", expected: " +
validationCommand.min
);
if (stackSize === 0) {
// Just "fix" the outline in replacing command by a endchar:
// it could lead to wrong rendering of some glyphs or not.
// For example, the pdf in #6132 is well-rendered.
data[j - 1] = 14;
return true;
}
return false;
}
}