From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- testfiles/rendering_tests/CMakeLists.txt | 68 +++++++++++++++ testfiles/rendering_tests/README | 26 ++++++ .../expected_rendering/multi-style.png | Bin 0 -> 1433 bytes .../selector-important-002-large.png | Bin 0 -> 11306 bytes .../expected_rendering/selector-important-002.png | Bin 0 -> 921 bytes .../selector-important-003-large.png | Bin 0 -> 11308 bytes .../expected_rendering/selector-important-003.png | Bin 0 -> 925 bytes .../expected_rendering/style-parsing.png | Bin 0 -> 765 bytes .../symbol-svg2-geometry-properties.png | Bin 0 -> 1073 bytes .../test-baseline-shift-large.png | Bin 0 -> 97340 bytes .../expected_rendering/test-baseline-shift.png | Bin 0 -> 20024 bytes .../expected_rendering/test-dont-crash.png | Bin 0 -> 453 bytes .../expected_rendering/test-empty-large.png | Bin 0 -> 69082 bytes .../expected_rendering/test-empty.png | Bin 0 -> 6920 bytes .../expected_rendering/test-glyph-y-pos-large.png | Bin 0 -> 115278 bytes .../expected_rendering/test-glyph-y-pos.png | Bin 0 -> 22881 bytes .../test-powerstroke-join-large.png | Bin 0 -> 8037 bytes .../expected_rendering/test-powerstroke-join.png | Bin 0 -> 1796 bytes .../expected_rendering/test-rtl-vertical-large.png | Bin 0 -> 87221 bytes .../expected_rendering/test-rtl-vertical.png | Bin 0 -> 17482 bytes .../expected_rendering/test-use-large.png | Bin 0 -> 6452 bytes .../expected_rendering/test-use.png | Bin 0 -> 1204 bytes .../text-glyphs-combining-large.png | Bin 0 -> 172004 bytes .../expected_rendering/text-glyphs-combining.png | Bin 0 -> 35443 bytes .../text-glyphs-vertical-large.png | Bin 0 -> 106286 bytes .../expected_rendering/text-glyphs-vertical.png | Bin 0 -> 22834 bytes .../expected_rendering/text-gzipped-svg-glyph.png | Bin 0 -> 646 bytes .../expected_rendering/text-shaping-large.png | Bin 0 -> 83064 bytes .../expected_rendering/text-shaping.png | Bin 0 -> 33675 bytes testfiles/rendering_tests/fonts/Estedad-Medium.ttf | Bin 0 -> 60832 bytes .../rendering_tests/fonts/GeomTest-Regular.otf | Bin 0 -> 2984 bytes .../fonts/GeomTest-gzipped-SVG-glyphs.otf | Bin 0 -> 3424 bytes testfiles/rendering_tests/fonts/LICENSES | 10 +++ testfiles/rendering_tests/fonts/Lohit-Telugu.ttf | Bin 0 -> 341752 bytes .../rendering_tests/fonts/NotoSans-Regular.ttf | Bin 0 -> 468584 bytes .../fonts/NotoSansCJKjp-Regular.otf | Bin 0 -> 16427228 bytes .../fonts/NotoSansHebrew-Regular.ttf | Bin 0 -> 27696 bytes testfiles/rendering_tests/multi-style-import-1.css | 9 ++ testfiles/rendering_tests/multi-style-import-2.css | 7 ++ testfiles/rendering_tests/multi-style.svg | 94 +++++++++++++++++++++ .../rendering_tests/selector-important-002.svg | 58 +++++++++++++ .../rendering_tests/selector-important-003.svg | 57 +++++++++++++ testfiles/rendering_tests/style-parsing.svg | 16 ++++ .../symbol-svg2-geometry-properties.svg | 83 ++++++++++++++++++ testfiles/rendering_tests/test-baseline-shift.svg | 33 ++++++++ testfiles/rendering_tests/test-dont-crash.svg | 22 +++++ testfiles/rendering_tests/test-empty.svg | 65 ++++++++++++++ testfiles/rendering_tests/test-glyph-y-pos.svg | 32 +++++++ .../rendering_tests/test-powerstroke-join.svg | 6 ++ testfiles/rendering_tests/test-rtl-vertical.svg | 39 +++++++++ testfiles/rendering_tests/test-use-ref.svg | 89 +++++++++++++++++++ testfiles/rendering_tests/test-use.svg | 18 ++++ testfiles/rendering_tests/test.sh | 46 ++++++++++ .../rendering_tests/text-glyphs-combining.svg | 36 ++++++++ testfiles/rendering_tests/text-glyphs-vertical.svg | 53 ++++++++++++ .../rendering_tests/text-gzipped-svg-glyph.svg | 25 ++++++ testfiles/rendering_tests/text-shaping.svg | 93 ++++++++++++++++++++ 57 files changed, 985 insertions(+) create mode 100644 testfiles/rendering_tests/CMakeLists.txt create mode 100644 testfiles/rendering_tests/README create mode 100644 testfiles/rendering_tests/expected_rendering/multi-style.png create mode 100644 testfiles/rendering_tests/expected_rendering/selector-important-002-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/selector-important-002.png create mode 100644 testfiles/rendering_tests/expected_rendering/selector-important-003-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/selector-important-003.png create mode 100644 testfiles/rendering_tests/expected_rendering/style-parsing.png create mode 100644 testfiles/rendering_tests/expected_rendering/symbol-svg2-geometry-properties.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-baseline-shift-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-baseline-shift.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-dont-crash.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-empty-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-empty.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-glyph-y-pos-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-glyph-y-pos.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-powerstroke-join-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-powerstroke-join.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-rtl-vertical-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-rtl-vertical.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-use-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/test-use.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-glyphs-combining-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-glyphs-combining.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-glyphs-vertical-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-glyphs-vertical.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-gzipped-svg-glyph.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-shaping-large.png create mode 100644 testfiles/rendering_tests/expected_rendering/text-shaping.png create mode 100644 testfiles/rendering_tests/fonts/Estedad-Medium.ttf create mode 100644 testfiles/rendering_tests/fonts/GeomTest-Regular.otf create mode 100755 testfiles/rendering_tests/fonts/GeomTest-gzipped-SVG-glyphs.otf create mode 100644 testfiles/rendering_tests/fonts/LICENSES create mode 100644 testfiles/rendering_tests/fonts/Lohit-Telugu.ttf create mode 100644 testfiles/rendering_tests/fonts/NotoSans-Regular.ttf create mode 100644 testfiles/rendering_tests/fonts/NotoSansCJKjp-Regular.otf create mode 100644 testfiles/rendering_tests/fonts/NotoSansHebrew-Regular.ttf create mode 100644 testfiles/rendering_tests/multi-style-import-1.css create mode 100644 testfiles/rendering_tests/multi-style-import-2.css create mode 100644 testfiles/rendering_tests/multi-style.svg create mode 100644 testfiles/rendering_tests/selector-important-002.svg create mode 100644 testfiles/rendering_tests/selector-important-003.svg create mode 100644 testfiles/rendering_tests/style-parsing.svg create mode 100644 testfiles/rendering_tests/symbol-svg2-geometry-properties.svg create mode 100644 testfiles/rendering_tests/test-baseline-shift.svg create mode 100644 testfiles/rendering_tests/test-dont-crash.svg create mode 100644 testfiles/rendering_tests/test-empty.svg create mode 100644 testfiles/rendering_tests/test-glyph-y-pos.svg create mode 100644 testfiles/rendering_tests/test-powerstroke-join.svg create mode 100644 testfiles/rendering_tests/test-rtl-vertical.svg create mode 100644 testfiles/rendering_tests/test-use-ref.svg create mode 100644 testfiles/rendering_tests/test-use.svg create mode 100755 testfiles/rendering_tests/test.sh create mode 100644 testfiles/rendering_tests/text-glyphs-combining.svg create mode 100644 testfiles/rendering_tests/text-glyphs-vertical.svg create mode 100644 testfiles/rendering_tests/text-gzipped-svg-glyph.svg create mode 100644 testfiles/rendering_tests/text-shaping.svg (limited to 'testfiles/rendering_tests') diff --git a/testfiles/rendering_tests/CMakeLists.txt b/testfiles/rendering_tests/CMakeLists.txt new file mode 100644 index 0000000..260dfa3 --- /dev/null +++ b/testfiles/rendering_tests/CMakeLists.txt @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0-or-later + +# Tests to run for 64-bit builds only. These fail in 32-bit builds (possibly due to rounding issues) +# TODO: Figure out actual cause and see if we can fix it +if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) + set(RENDERING_TESTS_64bit + test-rtl-vertical + + # .otf font with compressed SVG glyphs + text-gzipped-svg-glyph + ) +endif() + +#add your test here (do not put the .svg extension) +set(RENDERING_TESTS + # -- Generic tests -- + test-empty + test-dont-crash + test-use + + # -- Selector tests -- + selector-important-002 + selector-important-003 + + multi-style + style-parsing + + # -- Text tests -- + ## Many (if not all) of these tests are sensitive to the text rendering stack: FreeType, HarfBuzz, Pango. + + # test-baseline-shift + ## Small differences with code adapted for Pango 1.44. + + test-glyph-y-pos + ## to be fixed since an update happened between harfbuzz 1.5.1(OK) and 1.6.0(FAIL). + ## If you re-enable the test, you may have to *slightly* fix the expected rendering (hoping the fix happens upstream). + ## Please also check that the rendering with harfbuzz <=1.5.1 is not *too* wrong (for older systems) + ## cf Tav's post : https://www.patreon.com/posts/into-sinkhole-19021727 + ## and bug https://bugzilla.gnome.org/show_bug.cgi?id=787526 + + # text-shaping + ## Expected rendering generated with Pango 1.44. Currently fails with + ## CI as CI uses Pango 1.40. Enable after updating CI to Ubuntu 20.04. + + text-glyphs-combining + ## Expected rendering generated with Pango 1.44. + + text-glyphs-vertical + ## Expected rendering generated with Pango 1.44. + + # -- LPE tests -- + test-powerstroke-join + + # geometric properties (SVG 2.0 feature) + symbol-svg2-geometry-properties + + ${RENDERING_TESTS_64bit} +) + + +foreach(rendering_test ${RENDERING_TESTS}) + set(testname "render_${rendering_test}") + add_test(NAME ${testname} + COMMAND bash ${CMAKE_CURRENT_SOURCE_DIR}/test.sh ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/inkscape ${CMAKE_CURRENT_SOURCE_DIR}/${rendering_test} + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/testfiles/rendering_tests) + set_tests_properties(${testname} PROPERTIES ENVIRONMENT "${INKSCAPE_TEST_PROFILE_DIR_ENV}/${testname};${CMAKE_CTEST_ENV}") +endforeach() + diff --git a/testfiles/rendering_tests/README b/testfiles/rendering_tests/README new file mode 100644 index 0000000..6ebcb4c --- /dev/null +++ b/testfiles/rendering_tests/README @@ -0,0 +1,26 @@ +HOWTO + +# Add a rendering test: + - create the svg file + - 0.92: + - inkscape .svg -d 96 -e expected_rendering/.png + - inkscape .svg -d 384 -e expected_rendering/-large.png + - 1.0: + - inkscape -d 96 --export-filename=expected_rendering/.png .svg + - inkscape -d 384 --export-filename=expected_rendering/-large.png .svg + - add the test in CMakeLists.txt + - use stable if possible to generate the reference png files + - git add .svg expected_rendering/-large.png expected_rendering/.png + +# Fix a failing test (due to a change in code): + - DO *NOT* MODIFY the expected rendering (or the svg) before getting advice from inkscape-devel@ + - fix your code if possible + - IF you change introduces a greater compatibility with css or browsers + - AND you cannot reasonably "update" files from older versions to match the appearance + - AND inkscape-devel@ has a consensus that it's the only way + -> do as you must + - manually double check the changes + +# Fix a failing test (due to a change in pixman or cairo): + - update renderings. Use a *stable* version to generate the renderings, NOT TRUNK + - manually check appearances diff --git a/testfiles/rendering_tests/expected_rendering/multi-style.png b/testfiles/rendering_tests/expected_rendering/multi-style.png new file mode 100644 index 0000000..7c7c2fb Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/multi-style.png differ diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png b/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png new file mode 100644 index 0000000..e92eef0 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/selector-important-002-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-002.png b/testfiles/rendering_tests/expected_rendering/selector-important-002.png new file mode 100644 index 0000000..b0af9bd Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/selector-important-002.png differ diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png b/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png new file mode 100644 index 0000000..91cb3af Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/selector-important-003-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/selector-important-003.png b/testfiles/rendering_tests/expected_rendering/selector-important-003.png new file mode 100644 index 0000000..dfe3dbc Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/selector-important-003.png differ diff --git a/testfiles/rendering_tests/expected_rendering/style-parsing.png b/testfiles/rendering_tests/expected_rendering/style-parsing.png new file mode 100644 index 0000000..5b60834 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/style-parsing.png differ diff --git a/testfiles/rendering_tests/expected_rendering/symbol-svg2-geometry-properties.png b/testfiles/rendering_tests/expected_rendering/symbol-svg2-geometry-properties.png new file mode 100644 index 0000000..ca5e83e Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/symbol-svg2-geometry-properties.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-baseline-shift-large.png b/testfiles/rendering_tests/expected_rendering/test-baseline-shift-large.png new file mode 100644 index 0000000..29369a8 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-baseline-shift-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-baseline-shift.png b/testfiles/rendering_tests/expected_rendering/test-baseline-shift.png new file mode 100644 index 0000000..45aed90 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-baseline-shift.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-dont-crash.png b/testfiles/rendering_tests/expected_rendering/test-dont-crash.png new file mode 100644 index 0000000..a2d005e Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-dont-crash.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-empty-large.png b/testfiles/rendering_tests/expected_rendering/test-empty-large.png new file mode 100644 index 0000000..34acf1f Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-empty-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-empty.png b/testfiles/rendering_tests/expected_rendering/test-empty.png new file mode 100644 index 0000000..2e0a5fe Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-empty.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos-large.png b/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos-large.png new file mode 100644 index 0000000..57066fe Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos.png b/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos.png new file mode 100644 index 0000000..38c0117 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-glyph-y-pos.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-powerstroke-join-large.png b/testfiles/rendering_tests/expected_rendering/test-powerstroke-join-large.png new file mode 100644 index 0000000..72d8821 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-powerstroke-join-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-powerstroke-join.png b/testfiles/rendering_tests/expected_rendering/test-powerstroke-join.png new file mode 100644 index 0000000..1eeec07 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-powerstroke-join.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-rtl-vertical-large.png b/testfiles/rendering_tests/expected_rendering/test-rtl-vertical-large.png new file mode 100644 index 0000000..d473a59 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-rtl-vertical-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-rtl-vertical.png b/testfiles/rendering_tests/expected_rendering/test-rtl-vertical.png new file mode 100644 index 0000000..49db6cb Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-rtl-vertical.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-use-large.png b/testfiles/rendering_tests/expected_rendering/test-use-large.png new file mode 100644 index 0000000..c1f4597 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-use-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/test-use.png b/testfiles/rendering_tests/expected_rendering/test-use.png new file mode 100644 index 0000000..a995136 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/test-use.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-glyphs-combining-large.png b/testfiles/rendering_tests/expected_rendering/text-glyphs-combining-large.png new file mode 100644 index 0000000..5568888 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-glyphs-combining-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-glyphs-combining.png b/testfiles/rendering_tests/expected_rendering/text-glyphs-combining.png new file mode 100644 index 0000000..32a6781 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-glyphs-combining.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical-large.png b/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical-large.png new file mode 100644 index 0000000..f49cbbd Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical.png b/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical.png new file mode 100644 index 0000000..cab1c0b Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-glyphs-vertical.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-gzipped-svg-glyph.png b/testfiles/rendering_tests/expected_rendering/text-gzipped-svg-glyph.png new file mode 100644 index 0000000..8e8a184 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-gzipped-svg-glyph.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-shaping-large.png b/testfiles/rendering_tests/expected_rendering/text-shaping-large.png new file mode 100644 index 0000000..e84ebf5 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-shaping-large.png differ diff --git a/testfiles/rendering_tests/expected_rendering/text-shaping.png b/testfiles/rendering_tests/expected_rendering/text-shaping.png new file mode 100644 index 0000000..346ab77 Binary files /dev/null and b/testfiles/rendering_tests/expected_rendering/text-shaping.png differ diff --git a/testfiles/rendering_tests/fonts/Estedad-Medium.ttf b/testfiles/rendering_tests/fonts/Estedad-Medium.ttf new file mode 100644 index 0000000..d4844c2 Binary files /dev/null and b/testfiles/rendering_tests/fonts/Estedad-Medium.ttf differ diff --git a/testfiles/rendering_tests/fonts/GeomTest-Regular.otf b/testfiles/rendering_tests/fonts/GeomTest-Regular.otf new file mode 100644 index 0000000..a008cbf Binary files /dev/null and b/testfiles/rendering_tests/fonts/GeomTest-Regular.otf differ diff --git a/testfiles/rendering_tests/fonts/GeomTest-gzipped-SVG-glyphs.otf b/testfiles/rendering_tests/fonts/GeomTest-gzipped-SVG-glyphs.otf new file mode 100755 index 0000000..d8a89e3 Binary files /dev/null and b/testfiles/rendering_tests/fonts/GeomTest-gzipped-SVG-glyphs.otf differ diff --git a/testfiles/rendering_tests/fonts/LICENSES b/testfiles/rendering_tests/fonts/LICENSES new file mode 100644 index 0000000..71bfc0e --- /dev/null +++ b/testfiles/rendering_tests/fonts/LICENSES @@ -0,0 +1,10 @@ + +All fonts in this directory are licensed under open licenses. + +Lohit (https://pagure.io/lohit SIL Open Font 1.1) +NotoSans (https://www.google.com/get/noto/ Open Font License 1.1) +Estedad (https://github.com/aminabedi68/Estedad/ SIL Open Font 1.1) + +GeomTest Released under Open Font Licens 1.1. Copyright Tavmjong Bah 2015,2019 + + diff --git a/testfiles/rendering_tests/fonts/Lohit-Telugu.ttf b/testfiles/rendering_tests/fonts/Lohit-Telugu.ttf new file mode 100644 index 0000000..3869703 Binary files /dev/null and b/testfiles/rendering_tests/fonts/Lohit-Telugu.ttf differ diff --git a/testfiles/rendering_tests/fonts/NotoSans-Regular.ttf b/testfiles/rendering_tests/fonts/NotoSans-Regular.ttf new file mode 100644 index 0000000..b031a49 Binary files /dev/null and b/testfiles/rendering_tests/fonts/NotoSans-Regular.ttf differ diff --git a/testfiles/rendering_tests/fonts/NotoSansCJKjp-Regular.otf b/testfiles/rendering_tests/fonts/NotoSansCJKjp-Regular.otf new file mode 100644 index 0000000..296fbeb Binary files /dev/null and b/testfiles/rendering_tests/fonts/NotoSansCJKjp-Regular.otf differ diff --git a/testfiles/rendering_tests/fonts/NotoSansHebrew-Regular.ttf b/testfiles/rendering_tests/fonts/NotoSansHebrew-Regular.ttf new file mode 100644 index 0000000..9bf03ab Binary files /dev/null and b/testfiles/rendering_tests/fonts/NotoSansHebrew-Regular.ttf differ diff --git a/testfiles/rendering_tests/multi-style-import-1.css b/testfiles/rendering_tests/multi-style-import-1.css new file mode 100644 index 0000000..e6fb1e0 --- /dev/null +++ b/testfiles/rendering_tests/multi-style-import-1.css @@ -0,0 +1,9 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +/* overwritten later */ +rect { fill: red; } +.c1 { fill: red; } + +/* not overwritten */ +#background { fill: white; } +.c5 { fill: #00ccff; } diff --git a/testfiles/rendering_tests/multi-style-import-2.css b/testfiles/rendering_tests/multi-style-import-2.css new file mode 100644 index 0000000..3e0dd9b --- /dev/null +++ b/testfiles/rendering_tests/multi-style-import-2.css @@ -0,0 +1,7 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +rect { fill: blue; } +.c1 { fill: #990099; } + +/* overwritten later */ +.c4 { fill: red; } diff --git a/testfiles/rendering_tests/multi-style.svg b/testfiles/rendering_tests/multi-style.svg new file mode 100644 index 0000000..842f946 --- /dev/null +++ b/testfiles/rendering_tests/multi-style.svg @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/rendering_tests/selector-important-002.svg b/testfiles/rendering_tests/selector-important-002.svg new file mode 100644 index 0000000..e5a66b6 --- /dev/null +++ b/testfiles/rendering_tests/selector-important-002.svg @@ -0,0 +1,58 @@ + + + Style "!important" — 002 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/rendering_tests/selector-important-003.svg b/testfiles/rendering_tests/selector-important-003.svg new file mode 100644 index 0000000..831319f --- /dev/null +++ b/testfiles/rendering_tests/selector-important-003.svg @@ -0,0 +1,57 @@ + + + Style "!important" — 003 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/rendering_tests/style-parsing.svg b/testfiles/rendering_tests/style-parsing.svg new file mode 100644 index 0000000..33e32cb --- /dev/null +++ b/testfiles/rendering_tests/style-parsing.svg @@ -0,0 +1,16 @@ + + + + + + + + + diff --git a/testfiles/rendering_tests/symbol-svg2-geometry-properties.svg b/testfiles/rendering_tests/symbol-svg2-geometry-properties.svg new file mode 100644 index 0000000..6eb87d3 --- /dev/null +++ b/testfiles/rendering_tests/symbol-svg2-geometry-properties.svg @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/rendering_tests/test-baseline-shift.svg b/testfiles/rendering_tests/test-baseline-shift.svg new file mode 100644 index 0000000..7d20d22 --- /dev/null +++ b/testfiles/rendering_tests/test-baseline-shift.svg @@ -0,0 +1,33 @@ + + + + + + + subscript: H2O + superscript: m2 + subscript: H2O + superscript: m2 + + + Sub- and Superscript + + diff --git a/testfiles/rendering_tests/test-dont-crash.svg b/testfiles/rendering_tests/test-dont-crash.svg new file mode 100644 index 0000000..d01c0ea --- /dev/null +++ b/testfiles/rendering_tests/test-dont-crash.svg @@ -0,0 +1,22 @@ + + + + + + + diff --git a/testfiles/rendering_tests/test-empty.svg b/testfiles/rendering_tests/test-empty.svg new file mode 100644 index 0000000..3b5ee5a --- /dev/null +++ b/testfiles/rendering_tests/test-empty.svg @@ -0,0 +1,65 @@ + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/testfiles/rendering_tests/test-glyph-y-pos.svg b/testfiles/rendering_tests/test-glyph-y-pos.svg new file mode 100644 index 0000000..6f44ef8 --- /dev/null +++ b/testfiles/rendering_tests/test-glyph-y-pos.svg @@ -0,0 +1,32 @@ + + + + + + + + G̃g̃X̃x̃ + G̃g̃X̃x̃ + G̃g̃X̃x̃ + + + Composed Glyphs + + diff --git a/testfiles/rendering_tests/test-powerstroke-join.svg b/testfiles/rendering_tests/test-powerstroke-join.svg new file mode 100644 index 0000000..2c05fb3 --- /dev/null +++ b/testfiles/rendering_tests/test-powerstroke-join.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/testfiles/rendering_tests/test-rtl-vertical.svg b/testfiles/rendering_tests/test-rtl-vertical.svg new file mode 100644 index 0000000..aa6610b --- /dev/null +++ b/testfiles/rendering_tests/test-rtl-vertical.svg @@ -0,0 +1,39 @@ + + + + + + + + أبجد + أبجد + أبجد + + + RTL text in vertical mode + + diff --git a/testfiles/rendering_tests/test-use-ref.svg b/testfiles/rendering_tests/test-use-ref.svg new file mode 100644 index 0000000..0e6edf3 --- /dev/null +++ b/testfiles/rendering_tests/test-use-ref.svg @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/testfiles/rendering_tests/test-use.svg b/testfiles/rendering_tests/test-use.svg new file mode 100644 index 0000000..7e8a8ac --- /dev/null +++ b/testfiles/rendering_tests/test-use.svg @@ -0,0 +1,18 @@ + + + + + diff --git a/testfiles/rendering_tests/test.sh b/testfiles/rendering_tests/test.sh new file mode 100755 index 0000000..e31376d --- /dev/null +++ b/testfiles/rendering_tests/test.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# SPDX-License-Identifier: GPL-2.0-or-later + +if [ "$#" -lt 2 ]; then + echo "pass the path of the inkscape executable as parameter then the name of the test" $# + exit 1 +fi + +command -v compare >/dev/null 2>&1 || { echo >&2 "I require ImageMagick's 'compare' but it's not installed. Aborting."; exit 1; } + +INKSCAPE_EXE=$1 +exit_status=0 +test=$2 +EXPECTED=$(dirname $test)"/expected_rendering/"$(basename $test) +testname=$(basename $test) + + + ${INKSCAPE_EXE} --export-png-use-dithering false --export-filename=${testname}.png -d 96 ${test}.svg #2>/dev/null >/dev/null + compare -metric AE ${testname}.png ${EXPECTED}.png ${testname}-compare.png 2> ${testname}-result.txt + test1=`cat ${testname}-result.txt` + echo $test1 + if [ "$test1" = 0 ]; then + echo ${testname} "PASSED" + rm ${testname}.png ${testname}-compare.png + else + echo ${testname} "FAILED" + exit_status=1 + fi + +if [ -f "${EXPECTED}-large.png" ]; then + ${INKSCAPE_EXE} --export-png-use-dithering false --export-filename=${testname}-large.png -d 384 ${test}.svg #2>/dev/null >/dev/null + compare -metric AE ${testname}-large.png ${EXPECTED}-large.png ${testname}-compare-large.png 2> ${testname}-result.txt + test2=`cat ${testname}-result.txt` + if [ "$test2" = 0 ]; then + echo ${testname}-large "PASSED" + rm ${testname}-large.png ${testname}-compare-large.png + else + echo ${testname}-large "FAILED" + exit_status=1 + fi +else + echo ${testname}-large "SKIPPED" +fi + +rm ${testname}-result.txt +exit $exit_status diff --git a/testfiles/rendering_tests/text-glyphs-combining.svg b/testfiles/rendering_tests/text-glyphs-combining.svg new file mode 100644 index 0000000..646ee05 --- /dev/null +++ b/testfiles/rendering_tests/text-glyphs-combining.svg @@ -0,0 +1,36 @@ + + + + + + + + õőo̓ơọo̫o̳o̻o̓o͋o͗o͡ + õőo̓ơọo̫o̳o̻o̓o͋o͗o͡ + õőo̓ơọo̫o̳o̻o̓o͋o͗o͡ + õőo̓ơọo̫o̳o̻o̓o͋o͗o͡ + + + + + + + + diff --git a/testfiles/rendering_tests/text-glyphs-vertical.svg b/testfiles/rendering_tests/text-glyphs-vertical.svg new file mode 100644 index 0000000..585a404 --- /dev/null +++ b/testfiles/rendering_tests/text-glyphs-vertical.svg @@ -0,0 +1,53 @@ + + + + + + + + ㆕㆖㆘A回ーऄG̃g̃X̃x̃ + ㆕㆖㆘A回ーऄG̃g̃X̃x̃ + ㆕㆖㆘A回ーऄG̃g̃X̃x̃ + ㆕㆖㆘A回ーऄG̃g̃X̃x̃ + + + + + + + + diff --git a/testfiles/rendering_tests/text-gzipped-svg-glyph.svg b/testfiles/rendering_tests/text-gzipped-svg-glyph.svg new file mode 100644 index 0000000..88ba336 --- /dev/null +++ b/testfiles/rendering_tests/text-gzipped-svg-glyph.svg @@ -0,0 +1,25 @@ + + + + + + ABC + + diff --git a/testfiles/rendering_tests/text-shaping.svg b/testfiles/rendering_tests/text-shaping.svg new file mode 100644 index 0000000..80aa95a --- /dev/null +++ b/testfiles/rendering_tests/text-shaping.svg @@ -0,0 +1,93 @@ + + + + + + + + + نیرو + + بِسْمِ اللَّهِ الرَّحْمَنِ الرَّحِيمِ + + שָׁלוֹם + + חִירִיק + + â â̂ â â̂ + + a ḁ ą ą + + ヘ ペ ペ + + తెలుగులో + + + గ్రంథాలయం + + + ఇంక్‌స్కేప్ + + -- cgit v1.2.3