From 71501b5226ca7cbedbc5f972dd3d54d3d5de4d98 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Tue, 22 May 2018 16:48:17 +0000 Subject: Add test case for a font substitution regression. BUG=chromium:820345 Change-Id: Ia3adb6a7565e12f3d5e129e2babb4b8628028269 Reviewed-on: https://pdfium-review.googlesource.com/32810 Reviewed-by: dsinclair Commit-Queue: Lei Zhang --- testing/resources/pixel/bug_820345.in | 70 +++++++++++++++++++++ .../resources/pixel/bug_820345_expected.pdf.0.png | Bin 0 -> 758 bytes .../pixel/bug_820345_expected_mac.pdf.0.png | Bin 0 -> 2528 bytes 3 files changed, 70 insertions(+) create mode 100644 testing/resources/pixel/bug_820345.in create mode 100644 testing/resources/pixel/bug_820345_expected.pdf.0.png create mode 100644 testing/resources/pixel/bug_820345_expected_mac.pdf.0.png diff --git a/testing/resources/pixel/bug_820345.in b/testing/resources/pixel/bug_820345.in new file mode 100644 index 0000000000..2b440d5baa --- /dev/null +++ b/testing/resources/pixel/bug_820345.in @@ -0,0 +1,70 @@ +{{header}} +{{object 1 0}} << + /Type /Catalog + /Pages 2 0 R +>> +endobj +{{object 2 0}} << + /Type /Pages + /MediaBox [ 0 0 200 200 ] + /Count 1 + /Kids [ 3 0 R ] +>> +endobj +{{object 3 0}} << + /Type /Page + /Parent 2 0 R + /Resources << + /Font << + /F1 4 0 R + /F2 5 0 R + >> + >> + /Contents 6 0 R +>> +endobj +{{object 4 0}} << + /Type /Font + /Subtype /Type1 + /BaseFont /Times-Roman +>> +endobj +{{object 5 0}} << + /Type /Font + /Subtype /Type1 + /BaseFont /Helvetica + /FontDescriptor 7 0 R +>> +endobj +{{object 6 0}} << + {{streamlen}} +>> +stream +BT +20 50 Td +/F1 12 Tf +(Hello, world!) Tj +0 50 Td +/F2 16 Tf +(Goodbye, world!) Tj +ET +endstream +endobj +{{object 7 0}} << + /StemV 440 + /ItalicAngle 0 + /FontName /Arial + /Ascent 776 + /Type /FontDescriptor + /Flags 33 + /FontBBox [-250 -236 2827 1000] + /CapHeight 763 + /Descent -223 + /MissingWidth 745 + /MaxWidth 2658 +>> +endobj +{{xref}} +{{trailer}} +{{startxref}} +%%EOF diff --git a/testing/resources/pixel/bug_820345_expected.pdf.0.png b/testing/resources/pixel/bug_820345_expected.pdf.0.png new file mode 100644 index 0000000000..c29515a937 Binary files /dev/null and b/testing/resources/pixel/bug_820345_expected.pdf.0.png differ diff --git a/testing/resources/pixel/bug_820345_expected_mac.pdf.0.png b/testing/resources/pixel/bug_820345_expected_mac.pdf.0.png new file mode 100644 index 0000000000..6e79402ffc Binary files /dev/null and b/testing/resources/pixel/bug_820345_expected_mac.pdf.0.png differ -- cgit v1.2.3