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

View File

@ -130,6 +130,7 @@
!bug1513120_reduced.pdf
!bug1538111.pdf
!bug1552113.pdf
!issue6132.pdf
!issue9949.pdf
!bug1308536.pdf
!bug1337429.pdf

BIN
test/pdfs/issue6132.pdf Normal file

Binary file not shown.

View File

@ -2642,6 +2642,12 @@
"rounds": 1,
"type": "eq"
},
{ "id": "issue6132",
"file": "pdfs/issue6132.pdf",
"md5": "bd1e6252ca642acf2cd05db1748a073c",
"rounds": 1,
"type": "eq"
},
{ "id": "issue4875",
"file": "pdfs/issue4875.pdf",
"md5": "9a558e18029a42c0ef4e9a8755e24733",