From 78a2cf5e90f8b7d307e64a2e474af83f92b8b451 Mon Sep 17 00:00:00 2001 From: Carlos Amengual Date: Mon, 21 Oct 2024 20:15:37 +0200 Subject: [PATCH] Tests: test arabic characters Input document based on Batik PR by Paritosh Chauhan. --- .../test/svg/SamplesSpecRenderingTest.java | 5 +++ samples/tests/spec/text/arabicCharacters.svg | 30 ++++++++++++++++++ .../tests/spec/text/arabicCharacters.png | Bin 0 -> 7130 bytes 3 files changed, 35 insertions(+) create mode 100644 samples/tests/spec/text/arabicCharacters.svg create mode 100644 test-references/samples/tests/spec/text/arabicCharacters.png diff --git a/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/SamplesSpecRenderingTest.java b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/SamplesSpecRenderingTest.java index dcf7b9915..208315d27 100644 --- a/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/SamplesSpecRenderingTest.java +++ b/echosvg-test/src/test/java/io/sf/carte/echosvg/test/svg/SamplesSpecRenderingTest.java @@ -844,6 +844,11 @@ public void testTextAnchor3() throws TranscoderException, IOException { test("samples/tests/spec/text/textAnchor3.svg"); } + @Test + public void testTextArabicCharacters() throws TranscoderException, IOException { + testNV("samples/tests/spec/text/arabicCharacters.svg"); + } + @Test public void testTextBiDi() throws TranscoderException, IOException { test("samples/tests/spec/text/textBiDi.svg"); diff --git a/samples/tests/spec/text/arabicCharacters.svg b/samples/tests/spec/text/arabicCharacters.svg new file mode 100644 index 000000000..2cfb33c20 --- /dev/null +++ b/samples/tests/spec/text/arabicCharacters.svg @@ -0,0 +1,30 @@ + + + + + + + + + + + Arabic Shadda : شارع طَوِي أم الظِّبا + + diff --git a/test-references/samples/tests/spec/text/arabicCharacters.png b/test-references/samples/tests/spec/text/arabicCharacters.png new file mode 100644 index 0000000000000000000000000000000000000000..93145a4b3d63bb4d0dfc56fbe605aff850f772ed GIT binary patch literal 7130 zcmeHM_ct4E)K7=fnynV4Mys?&D2mozt=gN4S=t)0V}?+p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