Add a pixel test bug_1355.in.
For corpus test 3bigpreivew.pdf, some Japanese characters are shifted
to the lower left of their expected locations while rendering with
Skia/SkiaPaths on Linux platform.
This CL adds a pixel test of the characters which were rendered
incorrectly and suppress this test when Skia/SkiaPaths is enabled on
Linux. Due to bug_1355.in using the same font as bug_1402.in, this test
also needs to be suppressed on Windows as well.
Bug: pdfium:1355
Change-Id: If228d6e87e6ae4d5e9342732c0c92216e76bde05
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/88190
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Nigi <nigi@chromium.org>
diff --git a/testing/SUPPRESSIONS b/testing/SUPPRESSIONS
index 8d93b82..f2666f4 100644
--- a/testing/SUPPRESSIONS
+++ b/testing/SUPPRESSIONS
@@ -346,7 +346,11 @@
# TODO(pdfium:1331): Remove after associated bug is fixed
bug_1331.in * * * *
+#TODO(pdfium:1355): Remove after associated bug is fixed
+bug_1355.in linux * * skia,skiapaths
+
# TODO(pdfium:1461): Remove after associated bug is fixed
+bug_1355.in win * * *
bug_1402.in win * * *
# TODO(pdfium:1466): Remove after associated bug is fixed
diff --git a/testing/resources/pixel/bug_1355.in b/testing/resources/pixel/bug_1355.in
new file mode 100644
index 0000000..a00fcf1
--- /dev/null
+++ b/testing/resources/pixel/bug_1355.in
@@ -0,0 +1,85 @@
+{{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 [6 0 R]
+ /Resources 4 0 R
+ /MediaBox [0 0 200 200]
+>>
+endobj
+{{object 4 0}} <<
+ /ProcSet [/PDF /Text]
+ /Font <<
+ /F1 5 0 R
+ >>
+>>
+endobj
+{{object 5 0}} <<
+ /Type /Font
+ /Subtype /Type0
+ /BaseFont /HonMincho-M
+ /Encoding /90pv-RKSJ-H
+ /DescendantFonts [7 0 R]
+>>
+endobj
+{{object 6 0}} <<
+ {{streamlen}}
+>>
+stream
+BT
+/F1 4 Tf
+6 0 0 6 150 150 Tm
+0 0 0 1 k
+<eb5b>Tj
+-10 0 TD
+<eb69>Tj
+0 -8 TD
+<eb6a>Tj
+ET
+endstream
+endobj
+{{object 7 0}} <<
+ /Type /Font
+ /BaseFont /HonMincho-M
+ /CIDSystemInfo <<
+ /Ordering (Japan1)
+ /Registry (Adobe)
+ /Supplement 2
+ >>
+ /DW 1000
+ /FontDescriptor 8 0 R
+ /Subtype /CIDFontType2
+ /W [1 [250] 18 19 500 54 [833] 81 [583]]
+>>
+endobj
+{{object 8 0}} <<
+ /Type /FontDescriptor
+ /Ascent 880
+ /CapHeight 709
+ /Descent -120
+ /Flags 6
+ /FontBBox [-165 -221 1066 952]
+ /FontName /HonMincho-M
+ /ItalicAngle 0
+ /StemV 81
+ /Style <<
+ /Panose <010502020500000000000000>
+ >>
+ /XHeight 450
+>>
+endobj
+{{xref}}
+{{trailer}}
+{{startxref}}
+%%EOF
diff --git a/testing/resources/pixel/bug_1355_expected.pdf.0.png b/testing/resources/pixel/bug_1355_expected.pdf.0.png
new file mode 100644
index 0000000..6bb03ec
--- /dev/null
+++ b/testing/resources/pixel/bug_1355_expected.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1355_expected_mac.pdf.0.png b/testing/resources/pixel/bug_1355_expected_mac.pdf.0.png
new file mode 100644
index 0000000..4e32141
--- /dev/null
+++ b/testing/resources/pixel/bug_1355_expected_mac.pdf.0.png
Binary files differ
diff --git a/testing/resources/pixel/bug_1355_expected_skia_mac.pdf.0.png b/testing/resources/pixel/bug_1355_expected_skia_mac.pdf.0.png
new file mode 100644
index 0000000..72c7de6
--- /dev/null
+++ b/testing/resources/pixel/bug_1355_expected_skia_mac.pdf.0.png
Binary files differ