User:JoKalliauer/SVG test suites

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

SVG test suites

[edit]

Summary

[edit]
librsvg 2.50 resvg 0.14.0 Inkscape 1.0 Batik 1.13; 1.14[clarification needed]
Correctness according to the W3C test suite 0,662 0,831 0,745 0,801
cpu-time taken in the W3C test suite (512 px) 1m 46,776s 1m 04,490s 7m 57,465s 6m 51,560s
Correctness according to resvg test suite 0.754 0.956 0.729 0.703
Time measured by resvg test suite 4min 05sek 2min 30sek 46min 22sek 61min 29sek
Correctness with Wikimedia featured pictures 0.92 1.00
Time with Wikimedia featured pictures 5m 17,701s 4m 46,639s 15m 28,202s 11m 30,768s
time 2006-MediaWiki-collection (512px) 23.129s 9.551s 186.809s 87.313s
solved phab:-tasks relative to all tasks[1][clarification needed] 0.55[2] 0.88 0.78

commands

[edit]
command librsvg resvg Inkscape Batik
width 512px -w 512[3] -w 512[4] -w 512[5] -w 512[6]
dpi 96 -a -d 96dpi -p 96dpi[7] --dpi 96[8] -d 96[9] -dpi 96[10]
lang=de-AT, de, en Unix $LANG environment[11] --languages 'de-AT, de, en'[12] Unix $LANG environment[11] -lang[11] (not working)


Differences that are no mistake

[edit]

W3C SVG 1.1 test suite

[edit]

https://www.w3.org/Graphics/SVG/Test/20110816/

SVG librsvg resvg Inkscape batik chrome firefox svgnet wxsvg qtsvg
correctness 2 0,662 0,831 0,745 0,801 0,866 0,855 0,614 0,193 0,418
user+sys time (natural resolution) 13m 23.399s 0m 42.104s 22m 55.256s 70m 16.007s
time (300px) 13m 12,446s 1m 7,044s
time (512px) 14m 43,146s 1m 12,591s 21m 14,825s (4m 13.46s[13]) 29m 46,446s
time (512px) 1m52,417s

resvg test suite

[edit]

1338 files from https://github.com/RazrFalcon/resvg-test-suite/tree/master/tests, uploaded in Category:Rendersvg_test_suite.

SVG librsvg 2.50 resvg 0.14.0 Inkscape 1.0 Batik 1.13; 1.14 Chromium r818858 Firefox 83 SVG.NET 3.0.102 wxSVG 1.5.11
correctness[14] 0.754 0.956 0.729 0.703 0.886 0.872 0.450 0.254
time 4min 05sek 2min 30sek 46min 22sek 61min 29sek
time (300px) 4m 26,674s 2m 14,276s 27m 17,977s 45m 1,809s
time (512px) 6m 13,054s 2m 35,135s 38m 5,628s (17m 8.889s[13]/ 2m 22.970s[15]) 63m 36,648s

[clarification needed]

141 files in https://commons.wikimedia.org/wiki/Category:Featured_pictures_on_Wikimedia_Commons_-_vector

This category represents the most qualitative SVG-files on Commons. Different font-fallbacks are not considered as mistake.

SVG librsvg 2.50 resvg 0.14.0 Inkscape 1.0 batik 1.14
correctness 0.92 1.00
real time (limited to 1CPU) 5m 17,701s 4m 46,639s 15m 28,202s 11m 30,768s
real time (300px) 3m 44,533s 0m 50,908s 3m 37,714s 8m 29,825s
time (512px) 4m 28,886s 1m 15,307s 5m 9,164s (2m 27,598s[13]) 10m 8,168s

User:JoKalliauer/SVG test suites/Featured details

User:Glrx might be one of the experts about special SVG-features and details about SVG-standard, they are known for contributing useful test files.

Supporting SVG 2.0 features is not considered as a mistake, even if rendered as SVG 1.1 would be different. Since SVG 2.0 is not released, so such features do not count as mistakes, even if implemented wrong.

SVG librsvg 2.50.3 - 2.54.3 resvg 0.14.0 - 0.22.0 Inkscape 1.0.2 - 1.2 Batik 1.14

1 alignment-baseline
2 dominant-baseline
3 textLength
4 phab:T11420 textPath is not supported

1 alignment-baseline
2 dominant-baseline
3 textLength

1 alignment-baseline
2 no Chinese fallback-font
3 text-anchor

1 alignment-baseline
2 dominant-baseline


  1. Left 2 wrong
  2. Right 2 wrong
  3. Right 3 wrong
  4. Right 4 wrong

  1. Left 2 wrong
  2. Left 3 wrong
  3. Right 1 wrong
  4. Right 2 wrong
  5. Right 3 wrong
  6. Right 4 wrong

  1. nonquadratitic viewBox not supported
  2. Left 2 wrong
  3. Left 3 wrong
  4. Right 1 wrong
  5. Right 2 wrong
  6. Right 3 wrong
  7. Right 4 wrong

undefined behavior for SVG1.1
phab:T228321, resvg, w3c

This files are known to be difficult to render and are relevant features on commons. However here a comparison about correctness might be missleading.

see Librsvg_bugs for most important ones

see Template:C for simple minimal working examples

textPath

[edit]

There exist no renderer and no browser (at least neither Chrome nor Firefox) that fully suppport textPath: e.g:

  1. librsvg does not support it at all(!)
  2. resvg not in combination with textLength
  3. Inkscape supports negative offsets wrong
  4. batik chrashes sometimes, here it is difficult to find out what's wrong

files showing a resvg-bug

[edit]

This files are known to be difficult to render and are relevant features on commons. However here a comparison about correctness might be missleading, since they are taken from resvg Bugreports .

requested files by others

[edit]
Note: You are allowed to edit this page!
Here everyone can add svg-files, which they want to check renderings by different software engines. Generally it should only be valid SVG 1.1-files.

Renderers

[edit]

Tested:

  • w:librsvg, a small, simple viewer to preview how SVG files will look when rendered by MediaWiki
  • resvg, one of the fastest and most correct SVG renderers[16], implemented in Rust
  • Inkscape, which also supports some Inkscape-specific (non-standard) SVG features
  • Apache Batik, an SVG toolkit implemented in Java

Others (not tested here):

References

[edit]
  1. mw:User:JoKalliauer/phab/wikimedia-svg-rendering
  2. This number is a bit unfair since all bugs are c-librsvg2.40-bugs
  3. https://helpmanual.io/help/rsvg-convert/
  4. https://github.com/RazrFalcon/resvg/issues/376#issue-859203339
  5. https://inkscape.org/de/doc/inkscape-man.html
  6. https://xmlgraphics.apache.org/batik/tools/rasterizer.html
  7. https://helpmanual.io/help/rsvg-convert/
  8. https://github.com/RazrFalcon/resvg/issues/376#issue-859203339
  9. https://inkscape.org/de/doc/inkscape-man.html
  10. https://xmlgraphics.apache.org/batik/tools/rasterizer.html
  11. a b c phab:T40010#7032149
  12. https://github.com/RazrFalcon/resvg/issues/376#issue-859203339
  13. a b c without restarting inkscape
  14. https://github.com/RazrFalcon/resvg#svg-support
  15. removing File:test_suite_resvg_e-feImage-015.svg and File:test_suite_resvg_e-feImage-016.svg
  16. User:JoKalliauer/SVG_test_suites