Add a test case for Type3 glyphs with negative width. Illustate a case where 3 glyphs should be drawn from right to left, but only the first glyph appears. Bug: chromium:1128284 Change-Id: I979e38155338af52b4e2cc491f5b90bb75c6b3b7 Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/73750 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Hui Yingst <nigi@chromium.org>
diff --git a/testing/resources/pixel/bug_1128284.in b/testing/resources/pixel/bug_1128284.in new file mode 100644 index 0000000..0dfda97 --- /dev/null +++ b/testing/resources/pixel/bug_1128284.in
@@ -0,0 +1,94 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R +>> +endobj +{{object 2 0}} << + /Type /Pages + /Count 1 + /Kids [3 0 R] +>> +endobj +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /Contents 4 0 R + /Resources << + /Font << + /F1 5 0 R + >> + >> + /MediaBox [0 0 200 200] +>> +endobj +{{object 4 0}} << + {{streamlen}} +>> +stream +0 g +BT +/F1 .1 Tf 1 0 0 1 100 100 Tm +[(a)16000(b)17000(c)]TJ +ET +endstream +endobj +{{object 5 0}} << + /Type /Font + /Subtype /Type3 + /CharProcs << + /a97 6 0 R + /a98 7 0 R + /a99 6 0 R + >> + /Encoding 8 0 R + /FirstChar 97 + /FontBBox [0 0 100 100] + /LastChar 99 + /Widths [-100 -50 -75] +>> +endobj +{{object 6 0}} << + {{streamlen}} +>> +stream +q +6 0 0 48 6 0 cm +BI +/W 6 +/H 48 +/BPC 1 +/IM true +ID +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx +EI +Q +endstream +endobj +{{object 7 0}} << + {{streamlen}} +>> +stream +q +6 0 0 48 6 0 cm +BI +/W 6 +/H 48 +/BPC 1 +/IM true +ID +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +EI +Q +endstream +endobj +{{object 8 0}} << + /Type /Encoding + /BaseEncoding /WinAnsiEncoding + /Differences [97 /a97 /a98 /a99] +>> +endobj +{{xref}} +{{trailer}} +{{startxref}} +%%EOF
diff --git a/testing/resources/pixel/bug_1128284_expected.pdf.0.png b/testing/resources/pixel/bug_1128284_expected.pdf.0.png new file mode 100644 index 0000000..5405729 --- /dev/null +++ b/testing/resources/pixel/bug_1128284_expected.pdf.0.png Binary files differ