Avoid truncating/breaking some Type3 glyphs in compileType3Glyph (bug 1245391, issue 10568)

*Hopefully this patch makes sense, since I cannot claim to fully understand this function.*

With the changes made in PR 3354 *some* Type3 glyph outlines are no longer rendering correctly, since the final paths were being accidentally ignored.
The fact that Type3 fonts are not very common in PDF documents, and that most Type3 glyphs are unaffected by this regression, probably explains why this has gone unnoticed since 2013.
This commit is contained in:
Jonas Jenwald 2019-02-21 16:25:34 +01:00
parent ece6a31a44
commit fb774a65b0
4 changed files with 25528 additions and 1 deletions

View File

@ -325,7 +325,10 @@ function compileType3Glyph(imgData) {
coords.push(p % width1);
coords.push((p / width1) | 0);
--count;
if (!points[p]) {
--count;
}
} while (p0 !== p);
outlines.push(coords);
--i;

View File

@ -91,6 +91,7 @@
!bug1200096.pdf
!bug1068432.pdf
!bug1146106.pdf
!bug1245391_reduced.pdf
!bug1252420.pdf
!issue9949.pdf
!bug1308536.pdf

File diff suppressed because it is too large Load Diff

View File

@ -1009,6 +1009,13 @@
"link": false,
"type": "eq"
},
{ "id": "bug1245391",
"file": "pdfs/bug1245391_reduced.pdf",
"md5": "6c946045ee0f2f663f269717c0f1614a",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "bug1250079",
"file": "pdfs/bug1250079.pdf",
"md5": "a1dd21a70ae7097d96273e85a80b26ef",