SVG 1.1 Full Static Support

About

This page contains results of the resvg test suite which is specifically designed for the resvg library.

Test suite design

  • One file - one test.
    In the official test suite, one file can have a lot of tests.

  • More edge-cases.
    Unlike the official SVG test suite.

  • Only supported SVG subset.
    resvg trying to support only the static SVG subset.

  • Tests are grouped by the element and attribute names.

What we don’t test

  • Features that isn’t yet implemented in the resvg.

  • XML parsing.
    Except some DTD and namespace resolving we assume that SVG library supports full XML 1.0 spec.

  • Extended CSS support.
    In the resvg case CSS parsing is done on the svgdom side. And we support only a minimal CSS subset.

  • Extended raster image formats features.
    We assume that underlying PNG and JPEG libraries are good.

  • a element. We treating it as g.

  • Pointer events.

  • Animations.

  • Scripting.

  • Embedded fonts.

Other SVG implementations

We are testing/comparing resvg with Chrome, Inkscape, Batik, librsvg and QtSvg for a reason.

  • Chrome and Firefox have very good SVG support. They are crossplatform and can be used in a headless mode.

  • Batik is a popular Java library for SVG rendering.

  • Inkscape is a popular choice on Linux.

  • librsvg is the main resvg rival, used in GNOME and XFCE for SVG rendering.

  • QtSvg is used by all Qt applications and KDE.

Basically, to compare an application with resvg, it should be crossplatform and accessible via CLI. And should be at least as good as QtSvg. Otherwise it’s pointless.

Tests summary

resvg git Firefox 65.0 Chromium r637110 Inkscape 0.92.3 librsvg 2.45.5 Batik 1.9 QtSvg 5.12.1 0 268 537 805 1073 995 963 955 815 819 782 422 Tests passed

Legend

Passed
Failed
Crashed
? Unknown

Elements

# Feature resvg Chrome Firefox Batik Inkscape librsvg QtSvg
Document Structure
svg 94% 100% 100% 69% 69% 94% 31%
1 Explicit `svg` namespace
2 `xmlns` validation
3 Mixed namespaces
4 Elements via ENTITY reference (1)
31 Elements via ENTITY reference (2)
32 Elements via ENTITY reference (3)
5 Attribute value via ENTITY reference
6 Empty (no children)
7 Not UTF-8 encoding
8 preserveAspectRatio=none
9 preserveAspectRatio=xMinYMin
10 preserveAspectRatio=xMidYMid
11 preserveAspectRatio=xMaxYMax
12 preserveAspectRatio='xMinYMin slice'
13 preserveAspectRatio='xMidYMid slice'
14 preserveAspectRatio='xMaxYMax slice'
15 `preserveAspectRatio` with `viewBox` not at zero pos
16 `viewBox` not at zero pos
17 Proportional `viewBox`
18 Invalid `id` attribute (UB) (1) ? ? ? ? ? ? ?
19 Invalid `id` attribute (UB) (2) ? ? ? ? ? ? ?
20 `FuncIRI` parsing (UB) ? ? ? ? ? ? ?
21 `FuncIRI` with invalid characters (UB)
22 Nested svg
23 Nested svg with viewBox
24 Nested svg with rect
25 Nested svg with rect and viewBox (1)
26 Nested svg with rect and viewBox (2)
27 Nested svg with rect and viewBox (3)
28 Nested svg with overflow:visible
29 Nested svg with overflow:auto
30 Deeply nested svg
33 `rect` inside a non-SVG element
34 Zero size
35 Negative size
36 No size
g 100% 100% 100% 50% 100% 100% 100%
1 Deeply nested groups
2 Recursive inheritance
defs 100% 100% 100% 100% 100% 100% 100%
1 Simple case
2 Out of order
3 Multiple `defs`
4 Nested `defs`
5 Ignore shapes inside `defs`
6 Style inheritance
7 Style inheritance on text
desc Not planned
title Not planned
symbol 100% 100% 100% 100% 44% 44% 22%
1 Simple case
2 Unused symbol
3 With `viewBox`
4 With `viewBox` and custom `use` size
5 With custom `use` size
6 With `viewBox` and custom `use` rect
7 With overflow:visible
8 With `use` transform
9 Indirect `symbol` reference
use 97% 97% 97% 67% 97% 73% 80%
1 Simple case
2 From `defs`
3 Style inheritance (1)
4 Style inheritance (2)
5 Style inheritance (3)
15 Opacity inheritance
16 `fill-opacity` inheritance
17 `stroke-opacity` inheritance
18 Transform inheritance
19 Display inheritance
6 `transform` attribute (1)
7 `transform` attribute (2)
8 xlink to an external file
9 CSS rules
10 Recursive
11 Self-recursive
12 Nested recursive (1)
27 Nested recursive (2)
13 Indirect recursive (1)
25 Indirect recursive (2)
26 Indirect recursive (3)
14 Non-linear order
20 With size
21 Position inheritance
22 Complex style resolving order
23 With `currentColor`
24 Duplicated ID's
28 xlink to an invalid element (1)
29 xlink to an invalid element (2)
30 xlink to an invalid element (3)
image 100% 77% 93% 70% 50% 40% 27%
1 External JPEG
2 External PNG
3 External SVG
17 External SVG with transform
6 External SVGZ
4 Embedded JPEG as image/jpg
9 Embedded JPEG as image/jpeg
5 Embedded PNG
7 Embedded SVG
8 Embedded SVGZ
10 preserveAspectRatio=none
11 preserveAspectRatio='xMinYMin meet'
12 preserveAspectRatio='xMidYMid meet'
13 preserveAspectRatio='xMaxYMax meet'
14 preserveAspectRatio='xMinYMin slice'
15 preserveAspectRatio='xMidYMid slice'
16 preserveAspectRatio='xMaxYMax slice'
18 preserveAspectRatio=none on SVG
19 preserveAspectRatio='xMinYMin meet' on SVG
20 preserveAspectRatio='xMidYMid meet' on SVG
21 preserveAspectRatio='xMaxYMax meet' on SVG
22 preserveAspectRatio='xMinYMin slice' on SVG
23 preserveAspectRatio='xMidYMid slice' on SVG
24 preserveAspectRatio='xMaxYMax slice' on SVG
25 Raster image and size with odd numbers
35 With zero `width` and `height`
36 Zero `width`
37 Zero `height`
26 No `width` and `height` (UB) ? ? ? ? ? ?
27 No `width` (UB) ? ? ? ? ? ?
28 No `height` (UB) ? ? ? ? ? ?
29 No `width` and `height` on SVG (UB) ? ? ? ? ? ?
30 No `width` on SVG (UB) ? ? ? ? ? ?
31 No `height` on SVG (UB) ? ? ? ? ? ?
32 Float size (UB) ? ? ? ? ? ?
33 Recursive (1)
34 Recursive (2)
switch 100% 62% 92% 92% 92% 92% 77%
1 Simple case
2 `systemLanguage`
3 `requiredFeatures`
4 With attributes
5 systemLanguage='en'
6 systemLanguage='en-US'
7 systemLanguage='en-GB'
8 systemLanguage='ru-Ru'
9 systemLanguage='ru, en'
10 `display:none` on child
11 Single child
12 Non-SVG child
13 Comment as first child
Styling
style 82% 100% 100% 100% 82% 73% 27%
1 Class selector
2 Type selector
3 ID selector
4 Attribute selector
5 Universal selector
6 Combined selectors
7 Unresolved class selector
8 Style inside CDATA
9 Resolve order
10 Style after usage
11 Invalid type
Paths
path 100% 100% 100% 80% 96% 100% 85%
1 Empty
2 M
3 M L
4 M H
5 M V
6 M C
7 M S
8 M Q
9 M T
10 M A
11 M A trimmed
12 M L (L)
13 M C S
14 M Q T
44 M T S
45 M T T
46 M T Q
15 M S S
16 M H H
17 M H (H)
18 M V V
19 M V (V)
20 M Z
21 M L L Z
22 M L L z
23 M M
24 M m
25 m M
26 M (M) (M)
27 m (m) (m)
28 M L M L
29 M L M
30 M L M Z
31 Numeric character references
32 No commawsp between arc flags
33 No commawsp between and after arc flags
34 Out of range large-arc-flag value
35 Negative sweep-flag value
36 No commawsp after sweep-flag
37 No commawsp before arc flags
38 Out of range sweep-flag value
39 Negative large-arc-flag value
40 Multi-line data
41 Extra spaces
42 Missing coordinate in L
43 Invalid data in L
Basic Shapes
rect 100% 100% 93% 67% 93% 81% 67%
1 Simple case
2 `x` attribute resolving
3 `y` attribute resolving
4 Rounded rect
5 `rx` attribute resolving
6 `ry` attribute resolving
7 Missing `width` attribute processing
8 Missing `height` attribute processing
9 Zero `width` attribute processing
10 Zero `height` attribute processing
11 Negative `width` attribute processing
12 Negative `height` attribute processing
13 Negative `rx` attribute resolving
14 Negative `ry` attribute resolving
15 Negative `rx` and `ry` attributes resolving
16 Zero `rx` attribute resolving
17 Zero `ry` attribute resolving
18 `rx` attribute clamping
19 `ry` attribute clamping
20 `rx` and `ry` attributes clamping order
21 Percentage values
22 `em` values
23 `ex` values
24 `mm` values
25 Invalid length
26 With child
27 Invalid coordinates
circle 100% 100% 100% 67% 100% 100% 83%
1 Simple case
2 Missing `r` attribute
3 Missing `cx` attribute
4 Missing `cy` attribute
5 Missing `cx` and `cy` attributes
6 Negative `r` attribute
ellipse 100% 80% 100% 40% 100% 100% 70%
1 Simple case
2 Missing `rx` attribute
3 Missing `ry` attribute
4 Missing `rx` and `ry` attributes
5 Missing `cx` attribute
6 Missing `cy` attribute
7 Missing `cx` and `cy` attributes
8 Negative `rx` attribute
9 Negative `ry` attribute
10 Negative `rx` and `ry` attributes
line 100% 100% 100% 89% 100% 100% 100%
1 Simple case
2 No coordinates
3 No `x1` coordinate
4 No `y1` coordinate
5 No `x2` coordinate
6 No `y2` coordinate
7 No `x1` and `y1` coordinates
8 No `x2` and `y2` coordinates
9 With `transform`
polyline 100% 100% 100% 40% 100% 60% 100%
1 Simple case
2 Not enough points
3 Ignore odd points
4 Stop processing on invalid data
5 Missing `points` attribute
polygon 100% 100% 100% 40% 100% 60% 100%
1 Simple case
2 Not enough points
3 Ignore odd points
4 Stop processing on invalid data
5 Missing `points` attribute
Text
text 85% 82% 90% 67% 64% 49% 31%
1 Simple case
2 `x` and `y` with multiple values
3 `x` and `y` with less values than characters
4 `x` and `y` with more values than characters
24 `x` and `y` with multiple values and `tspan`
30 `x` and `y` with multiple values and arabic text
5 `dx` and `dy` instead of `x` and `y`
6 `dx` and `dy` with multiple values
7 `dx` and `dy` with less values than characters
8 `dx` and `dy` with more values than characters
9 `x` and `y` with `dx` and `dy`
10 `x` and `y` with `dx` and `dy` lists
11 `rotate`
12 `rotate` with multiple values
13 `rotate` with less values than characters
14 `rotate` with more values than characters
33 `rotate` with multiple values, underline and pattern
34 `rotate` with multiple values and complex text
36 `rotate` on Arabic
38 `rotate` with an invalid angle
15 Percent coordinates
16 `em` and `ex` coordinates
17 `mm` coordinates
39 No coordinates
18 Escaped text (1)
19 Escaped text (2)
20 Escaped text (3)
21 Escaped text (4)
22 `xml:space`
23 `transform`
25 Complex graphemes
26 Complex graphemes and coordinates list
27 Emojis
28 Compound emojis
29 Compound emojis and coordinates list
31 Zalgo
35 BIDI reordering
37 Nested
40 fill-rule=evenodd
tspan 90% 76% 83% 86% 66% 66% 45%
1 Without attributes
2 With `x` and `y`
14 With `dy`
15 Only with `y`
27 Multiple coordinates
3 Style override
4 Sequential
5 Mixed
6 Nested
7 `xml:space` (1)
8 `xml:space` (2)
9 Mixed `xml:space` (1)
10 Mixed `xml:space` (2)
11 Mixed `xml:space` (3)
12 `transform`
13 Pseudo-multi-line
16 Nested `rotate`
17 Rotate on child
18 With opacity
19 Outside the `text`
20 With `mask`
21 With `clip-path`
22 With `filter`
23 Text shaping across multiple `tspan` (1)
24 Text shaping across multiple `tspan` (2)
25 `tspan` bbox
26 `tspan` span and BIDI reordering
28 Mixed `font-size`
29 `rotate` and `display:none`
tref 75% 0% 0% 50% 75% 38% 0%
1 Link to `text`
2 Link to complex `text`
3 Link to non-SVG element
4 Link to external file element
5 Nested
6 Position attributes
7 Style attributes
8 `xml:space`
textPath 0% 100% 100% 100% 100% 0% 0%
1 Simple case
altGlyph Not planned
altGlyphDef Not planned
altGlyphItem Not planned
glyphRef Not planned
Painting: Filling, Stroking and Marker Symbols
marker 98% 95% 96% 76% 71% 85% 0%
1 No stroke on target
2 Default clip
3 With markerUnits=userSpaceOnUse
4 With invalid `markerUnits`
5 Only `marker-start`
6 Only `marker-mid`
7 Only `marker-end`
8 With `viewBox` (1) (UB) ? ? ? ? ? ? ?
9 With `viewBox` (2)
10 The `marker` property
11 The `marker` property in CSS
12 Marker on line
13 Marker on polyline
14 Marker on polygon
15 Marker on circle
16 Marker on rect
17 Marker on text
18 With a text child
19 With an image child
20 Empty
21 Invalid child
22 Nested
23 Recursive (1)
24 Recursive (2)
25 Recursive (3)
57 Recursive (4)
26 Inheritance (1)
27 Inheritance (2)
28 Zero-sized
29 Marker with a negative size
30 Zero-sized stroke
31 Target with subpaths (1)
32 Target with subpaths (2) (UB) ? ? ? ? ? ? ?
33 Zero-length path (1)
34 Zero-length path (2)
35 On ArcTo
36 With a large stroke
37 orient=30
38 orient=40grad
39 orient=1.5rad
40 orient=-45
41 orient=9999
42 orient=auto on M L
43 orient=auto on M L L
44 orient=auto on M L L Z Z Z
45 orient=auto on M L Z
46 orient=auto on M C L
47 orient=auto on M L C
48 orient=auto on M C C (1)
49 orient=auto on M C C (2)
50 orient=auto on M C C (3)
51 orient=auto on M C C (4)
52 orient=auto on M C C (5)
53 orient=auto on M C C (6)
54 orient=auto on M C C (7)
55 orient=auto on M L M C
56 orient=auto on M C M L
Color
color-profile Not planned
Gradients and Patterns
linearGradient 100% 100% 100% 72% 86% 94% 72%
1 Default attributes
2 spreadMethod=pad
3 spreadMethod=reflect
4 spreadMethod=repeat
5 Invalid `spreadMethod`
6 gradientUnits=userSpaceOnUse
29 gradientUnits=userSpaceOnUse with %
30 gradientUnits=objectBoundingBox with %
31 Invalid `gradientUnits`
7 Stops via `xlink:href`
8 Stops via `xlink:href` from `radialGradient`
9 Stops via `xlink:href` from `rect`
10 Stops via `xlink:href`. Complex order (1)
28 Stops via `xlink:href`. Complex order (2)
11 Attributes via `xlink:href`
12 Attributes via `xlink:href` from `radialGradient`
13 Attributes via `xlink:href` from `rect`
14 Attributes via `xlink:href`. Only required
15 Attributes via `xlink:href`. Complex order
16 Unresolved `xlink:href`
17 Invalid `xlink:href`
18 Self-recursive `xlink:href`
19 Recursive `xlink:href` (1)
35 Recursive `xlink:href` (2)
36 Recursive `xlink:href` (3)
20 gradientTransform
21 gradientTransform + transform
22 Many stops
23 Single stop
25 Single stop with opacity used by `fill`
26 Single stop with opacity used by `stroke`
27 Single stop with opacity used by `fill` and `stroke`
24 No stops
32 Invalid child (1)
33 Invalid child (2)
34 Invalid child (3)
37 Invalid `gradientTransform` (UB) ? ? ? ? ? ?
radialGradient 100% 89% 97% 78% 68% 89% 62%
1 Default attributes
2 spreadMethod=pad
3 spreadMethod=reflect
4 spreadMethod=repeat
5 Invalid `spreadMethod`
6 gradientUnits=userSpaceOnUse
35 gradientUnits=userSpaceOnUse with %
34 gradientUnits=objectBoundingBox with %
39 Invalid `gradientUnits` (UB) ? ? ? ? ? ? ?
7 Stops via `xlink:href`
8 Stops via `xlink:href`. Complex order
9 Stops via `xlink:href` from `linearGradient`
10 Stops via `xlink:href` from `rect`
11 Attributes via `xlink:href`
12 Attributes via `xlink:href`. Only required
13 Attributes via `xlink:href`. Complex order
14 Attributes via `xlink:href` from `linearGradient`
15 Attributes via `xlink:href` from `rect`
16 Unresolved `xlink:href`
17 `xlink:href` not to gradient
38 Invalid `xlink:href`
18 Self-recursive `xlink:href`
19 Recursive `xlink:href`
20 gradientTransform
21 gradientTransform + transform
40 Invalid `gradientTransform` (UB) ? ? ? ? ? ?
22 Many stops
23 Single stop
24 No stops
25 `fx` resolving (1)
26 `fx` resolving (2)
27 `fx` resolving (3)
28 `fy` resolving (1)
29 `fy` resolving (2)
30 `fy` resolving (3)
31 Focal point correction
32 Negative `r` (UB) ? ? ? ? ? ?
33 Zero `r`
36 Zero `r` with `stop-opacity` (1)
37 Zero `r` with `stop-opacity` (2)
stop 100% 100% 100% 71% 84% 94% 87%
1 `offset` clamping
2 `offset` clamping with %
3 Stop with smaller `offset`
4 Stops with equal `offset` (1)
5 Stops with equal `offset` (2)
6 Stops with equal `offset` (3)
15 Stops with equal `offset` (4)
16 Stops with equal `offset` (5)
17 Stops with equal `offset` (6)
7 `stop-color` with `currentColor` (1)
8 `stop-color` with `currentColor` (2)
9 `stop-color` with `currentColor` (3)
10 `stop-color` with `currentColor` (4)
11 `stop-color` with `inherit` (1)
12 `stop-color` with `inherit` (2)
13 `stop-color` with `inherit` (3)
14 `stop-color` with `inherit` (4)
18 `stop-color` with `inherit` (5)
19 Invalid `offset` (1)
20 Invalid `offset` (2)
21 Missing `offset` (1)
22 Missing `offset` (2)
23 Missing `offset` (3)
24 Missing `offset` (4)
25 Missing `offset` (5)
26 Missing `offset` (6)
27 Missing `offset` (7)
28 Zero `offset` in the middle
29 No `stop-color`
30 Equal `stop-color`
31 `offset` with %
pattern 100% 100% 96% 62% 62% 92% 0%
1 Simple case
2 display=none on child
3 overflow=visible (UB) ? ? ? ? ? ? ?
4 With `patternTransform`
5 `transform` + `patternTransform`
28 Invalid `patternTransform` (UB) ? ? ? ? ? ?
6 With `x` and `y`
7 patternUnits=objectBoundingBox
25 patternUnits=objectBoundingBox with %
26 patternUnits=userSpaceOnUse with %
8 patternContentUnits=objectBoundingBox
9 With `viewBox`
27 Invalid `patternUnits` and `patternContentUnits`
10 `patternContentUnits` with `viewBox`
11 `preserveAspectRatio`
12 Missing `width`
13 Missing `height`
14 Everything via `xlink:href`
15 Children via `xlink:href`
16 Attributes via `xlink:href`
17 No children
18 Text child
19 Pattern on child
20 Out of order referencing
21 Recursive on child
22 Self-recursive
23 Self-recursive on child
24 Nested `objectBoundingBox`
Clipping, Masking and Compositing
clipPath 100% 95% 84% 56% 67% 58% 0%
1 Simple case
2 `stroke` has no effect
3 `fill` has no effect
4 `opacity` has no effect
39 `mask` has no effect
40 `filter` has no effect
5 clipPathUnits=objectBoundingBox
6 `clip-path` with `transform`
7 `clip-path` with `transform` on text
8 `transform` on `clipPath`
43 Invalid `transform` on `clipPath`
9 Clipping with text
10 Clipping with complex text (1)
11 Clipping with complex text (2)
12 Clipping with complex text and `clip-rule`
13 clip-rule=evenodd
14 Mixed `clip-rule`
15 Multiple children
17 Overlapped shapes with `evenodd`
18 `clip-rule` from parent node
19 `clip-path` on child
34 `clip-path` on children
31 `clip-path` on child with transform
20 `clip-path` on self
36 `clip-path` on self (2)
32 Invalid `clip-path` on self
33 Invalid `clip-path` on child
21 Nested `clip-path`
22 No children
16 Invalid child (1)
23 Invalid child (2)
26 Invalid child (3)
24 Invisible child (1)
25 Invisible child (2)
27 `none`
28 Invalid FuncIRI
29 Recursive on child
30 Self-recursive
35 Recursive
37 Recursive on self
38 With marker on clip
41 On the root `svg` with size
42 On the root `svg` without size (UB) ? ? ? ? ? ? ?
44 With `use` child
mask 92% 96% 92% 8% 65% 65% 0%
1 Simple case
2 maskUnits=userSpaceOnUse without rect
3 maskUnits=userSpaceOnUse with `width` only
4 maskUnits=userSpaceOnUse with rect
5 maskContentUnits=objectBoundingBox
20 maskUnits=objectBoundingBox with %
21 maskUnits=userSpaceOnUse with %
6 `transform` has no effect
7 `transform` on shape
8 No children
9 Invalid child
10 Invisible child (1)
11 Invisible child (2)
12 With opacity (1)
13 With opacity (2)
14 With opacity (3)
15 With `clip-path`
16 Nested `objectBoundingBox`
17 color-interpolation=linearRGB
18 `none`
19 Invalid FuncIRI
22 Recursive on child (UB)
23 Self-recursive
24 Recursive
25 Recursive on self
26 `mask` on self
27 `mask` on child
Filter Effects
filter 82% 71% 92% 52% 65% 69% 0%
1 Simple case
2 With region
3 With region and filterUnits=userSpaceOnUse
57 Without region and filterUnits=userSpaceOnUse
4 With region and subregion
5 Invalid region
6 Huge region
7 With region outside the canvas
8 With region outside the viewbox
9 With subregion (1)
10 With subregion (2)
11 With subregion (3)
12 With subregion and primitiveUnits=objectBoundingBox (1)
55 With subregion and primitiveUnits=objectBoundingBox (2)
13 Zero-sized subregion
14 Negative subregion
15 Subregion bigger that region
16 Invalid subregion
17 Everything via `xlink:href`
18 Some attributes via `xlink:href`
19 Complex order and `xlink:href`
20 Unresolved `xlink:href`
21 Invalid `xlink:href`
22 Self-recursive `xlink:href`
23 Recursive `xlink:href`
24 No children
25 `transform` on filter
26 `transform` on shape
27 `transform` on shape with filter region
28 Initial `transform`
29 Global `transform`
30 primitiveUnits=objectBoundingBox
31 in=SourceAlpha
32 in=BackgroundImage
33 in=BackgroundAlpha
34 in=FillPaint
35 in=StrokePaint
36 in=FillPaint with gradient
37 in=FillPaint with pattern
38 in=FillPaint with target on `g`
39 Multiple primitives (1)
40 Multiple primitives (2)
41 Multiple primitives (3)
42 Multiple primitives (4)
43 `in` to invalid (1)
56 `in` to invalid (2)
44 Invalid primitive (1)
45 Invalid primitive (2)
46 Default color-interpolation-filters
47 color-interpolation-filters=sRGB
48 On an empty group
49 Invalid `filterUnits`
50 On zero-sized shape
51 Invalid FuncIRI
52 With `clip-path`
53 With `mask`
54 With `clip-path` and `mask`
58 With multiple transforms (1)
59 With multiple transforms (2)
60 On the root `svg` (UB) ? ? ? ? ? ? ?
61 On a vertical line
62 On a thin rect
63 `none`
feDistantLight Not supported by resvg
fePointLight Not supported by resvg
feSpotLight Not supported by resvg
feBlend 100% 100% 100% 88% 100% 100% 0%
1 mode=normal
2 mode=multiply
3 mode=screen
4 mode=darken
5 mode=lighten
6 Empty
7 With subregion on input (1)
8 With subregion on input (2)
feColorMatrix Not supported by resvg
feComponentTransfer Not supported by resvg
feComposite 100% 100% 100% 88% 100% 94% 0%
1 operator=over
2 operator=in
3 operator=out
4 operator=atop
5 operator=xor
9 operator=arithmetic
12 operator=arithmetic with opacity
13 operator=arithmetic on sRGB
14 operator=arithmetic with opacity on sRGB
15 operator=arithmetic and invalid `k1-4`
16 operator=arithmetic without `k1-4`
17 operator=arithmetic with some `k1-4`
10 Invalid `operator`
11 Default `operator`
6 Empty
7 With subregion on input (1)
8 With subregion on input (2)
feConvolveMatrix Not supported by resvg
feDiffuseLighting Not supported by resvg
feDisplacementMap Not supported by resvg
feFlood 83% 100% 100% 100% 83% 100% 0%
1 Default values
2 Green
3 With opacity
4 With opacity on target element
5 Subregion inheritance (1)
6 Partial subregion
feGaussianBlur 100% 100% 90% 80% 90% 70% 0%
1 Simple case
2 Huge `stdDeviation`
3 No `stdDeviation`
4 Empty `stdDeviation`
5 Negative `stdDeviation`
6 `stdDeviation` with multiple values
7 `stdDeviation` with two values
8 `stdDeviation` with two different values
9 stdDeviation=0 5
10 stdDeviation=5 0
feImage 82% 91% 82% 36% 18% 64% 0%
1 Simple case
2 SVG
3 Embedded PNG
4 preserveAspectRatio=none
5 Empty
6 Link to an element
7 With subregion (1)
8 With subregion (2)
9 With subregion (3)
10 With subregion (4)
11 With subregion (5)
feMerge 100% 100% 100% 100% 100% 100% 0%
1 color-interpolation-filters=linearRGB
2 color-interpolation-filters=sRGB
feMorphology Not supported by resvg
feOffset 86% 86% 86% 86% 86% 100% 0%
1 Simple case
2 Only `dx`
3 Only `dy`
4 No offset
5 Negative offset
6 Fractional offset
7 With primitiveUnits=objectBoundingBox
feSpecularLighting Not supported by resvg
feTile 100% 83% 100% 50% 17% 83% 0%
1 Simple case
2 With region
3 Empty region
4 With subregion (1)
5 With subregion (2)
6 With subregion (3)
feTurbulence Not supported by resvg
Interactivity
cursor Not planned
Linking
a 100% 100% 100% 100% 100% 40% 80%
1 On shape
2 On text
3 Inside text
4 Inside `tspan`
5 On `tspan`
view Not planned
Scripting
script Not planned
Animation
animate Not planned
set Not planned
animateMotion Not planned
animateColor Not planned
animateTransform Not planned
mpath Not planned
Fonts
font Not planned
glyph Not planned
missing-glyph Not planned
hkern Not planned
vkern Not planned
font-face Not planned
font-face-src Not planned
font-face-uri Not planned
font-face-format Not planned
font-face-name Not planned
Metadata
metadata Not planned
Extensibility
foreignObject Not planned

Attributes

Presentation

# Feature resvg Chrome Firefox Batik Inkscape librsvg QtSvg
alignment-baseline 0% 100% 0% 0% 0% 0% 0%
1 `hanging`
baseline-shift 100% 64% 0% 64% 73% 55% 0%
1 `baseline`
2 `sub`
3 `super`
4 `50%`
5 `-50%`
6 `10`
7 `-10`
8 `0`
9 `2mm`
10 With rotate
11 Nested `super`
12 Nested length
13 Deeply nested `super`
14 Inheritance (1)
15 Inheritance (2)
16 Inheritance (3)
17 Inheritance (4)
18 Inheritance (5)
19 Mixed nested
20 Nested with `baseline` (1)
21 Nested with `baseline` (2)
22 Invalid value
clip 0% 0% 0% 100% 0% 0% 0%
1 Simple case
clip-path 100% 100% 100% 100% 100% 100% 0%
1 Simple case
clip-rule 100% 100% 100% 100% 100% 100% 0%
1 clip-rule=evenodd
color 100% 100% 100% 100% 100% 100% 100%
1 Simple case
color-interpolation Not supported by resvg
color-interpolation-filters 100% 100% 100% 100% 100% 100% 0%
1 Default color-interpolation-filters
color-profile Not supported by resvg
color-rendering Not supported by resvg
cursor Not planned
direction 0% 100% 100% 0% 100% 0% 0%
1 `rtl`
2 `rtl` with vertical `writing-mode` (UB) ? ? ? ? ? ? ?
display 100% 44% 67% 78% 78% 67% 44%
1 `none` on `rect`
2 `none` on `defs`
3 `none` on `linearGradient`
4 `none` on `clipPath`
5 `none` on `tspan` (1)
9 `none` on `tspan` (2)
6 `none` on `tref`
7 `none` on `svg`
8 BBox impact
dominant-baseline 0% 100% 100% 0% 100% 0% 0%
1 `hanging`
enable-background 0% 0% 0% 100% 100% 100% 0%
1 Simple case
fill 97% 92% 92% 95% 90% 92% 77%
1 Named color
2 #RRGGBB color
3 #RGB color
4 #RRGGBB uppercase color
38 Invalid #RRGGBB (1)
39 Invalid #RRGGBB (2)
40 Invalid #RRGGBB (3)
5 Named color in uppercase
6 Named color in mixedcase
7 Not trimmed attribute value
8 `rgb(int, int, int)` color
9 `rgb(int, int, int)` color with extra spaces
10 `rgb(int int int)` (UB) ? ? ? ? ? ? ?
11 `rgb(int%, int%, int%)` color
12 `rgb(int%, int%, int%)` color with overflow
13 `rgb(float%, float%, float%)` color
28 `rgb(float%, float%, float%)` color with a big fraction part
14 `RGB(int%, int%, int%)` color
15 ICC color ? ? ? ? ? ? ?
16 Linear gradient on shape
17 Radial gradient on shape
18 Pattern on shape
19 Random value
20 `none`
21 `inherit`
22 `currentColor`
23 FuncIRI to an unsupported element
24 FuncIRI with a fallback color
25 FuncIRI to an invalid element with a fallback color
26 FuncIRI to a missing element with a fallback color
34 FuncIRI to an invalid element with a `currentColor` fallback
35 FuncIRI to a missing element with a `currentColor` fallback
36 FuncIRI to an invalid element with a `none` fallback
37 FuncIRI to a missing element with a `none` fallback
27 Valid FuncIRI with a fallback ICC color
29 `inherit` without parent
30 `currentColor` without parent
31 Linear gradient on text
32 Radial gradient on text
33 Pattern on text
fill-opacity 100% 100% 100% 100% 100% 83% 67%
1 Half opacity
2 With `opacity`
3 With `linearGradient`
4 With `pattern`
5 Nested
6 On text
fill-rule 100% 100% 100% 100% 100% 100% 100%
1 `evenodd`
2 `nonzero`
filter 100% 100% 100% 100% 100% 100% 0%
1 Nested filters
flood-color 100% 100% 100% 100% 83% 100% 0%
1 Simple case
2 Inheritance (1)
3 Inheritance (2)
4 Inheritance (3)
5 Inheritance (4)
6 Inheritance (5)
flood-opacity 100% 100% 100% 100% 100% 100% 0%
1 Simple case
font 0% 0% 0% 100% 0% 0% 0%
1 Simple case
font-family 100% 100% 100% 80% 100% 100% 100%
1 `serif`
2 `sans-serif`
3 `cursive`
4 `fantasy`
5 `monospace`
6 `Verdana`
7 `Times New Roman`
8 Font list
9 Fallback (1)
10 Fallback (2)
font-size 100% 100% 95% 100% 100% 63% 26%
1 Simple case
2 Inheritance
3 Percent value
4 Nested percent values (1)
20 Nested percent values (2)
5 Named value
6 Mixed values
7 Percent value without a parent
8 Named value without a parent
14 `em`
15 `ex`
16 `em` on the root element
17 `ex` on the root element
18 `em` nested and mixed
19 `ex` nested and mixed
9 Zero size
10 Zero size on parent (1)
11 Zero size on parent (2)
12 Zero size on parent (3)
13 Negative size (UB) ? ? ? ? ? ?
font-size-adjust 0% 0% 100% 0% 0% 0% 0%
1 Simple case
font-stretch 0% 0% 0% 100% 0% 0% 0%
1 `wider`
2 `inherit`
font-style 100% 100% 100% 100% 100% 100% 100%
1 `italic`
2 `oblique`
3 `inherit`
font-variant 0% 100% 100% 0% 0% 0% 0%
1 `small-caps`
2 `inherit`
font-weight 100% 92% 100% 58% 83% 58% 67%
1 `normal`
2 `bold`
3 `bolder`
4 `bolder` with clamping
5 `bolder` without parent
6 `lighter`
7 `lighter` with clamping
8 `lighter` without parent
9 `700`
10 `inherit`
11 Invalid number (1)
12 Invalid number (2)
glyph-orientation-horizontal 0% 0% 0% 100% 0% 0% 0%
1 Simple case
glyph-orientation-vertical 0% 0% 0% 100% 0% 0% 0%
1 Simple case
image-rendering 100% 0% 100% 67% 67% 0% 0%
1 `optimizeSpeed`
2 `optimizeSpeed` on SVG
3 On `feImage`
kerning 0% 0% 0% 100% 0% 0% 0%
1 Simple case
letter-spacing 67% 67% 0% 78% 67% 67% 0%
1 `normal`
2 `3`
3 `-3`
4 `0`
5 `5%`
6 `1mm`
7 on Arabic
8 Mixed spacing
9 Mixed scripts
10 Large negative (UB) ? ? ? ? ? ? ?
lighting-color Not supported by resvg
marker-start 100% 100% 100% 100% 100% 100% 0%
1 Simple case
marker-mid 100% 100% 100% 100% 100% 100% 0%
1 Simple case
marker-end 100% 100% 100% 100% 100% 100% 0%
1 Simple case
mask 100% 100% 100% 0% 100% 100% 0%
1 Simple case
opacity 100% 100% 100% 100% 67% 100% 67%
1 Group opacity
2 BBox impact
3 Clamp value (1)
4 Clamp value (2)
5 Invalid value (1)
6 Invalid value (2)
7 On the root `svg`
8 Mixed group opacity
9 On an invalid element
overflow 100% 100% 67% 100% 67% 100% 0%
1 `visible` on `marker`
2 `scroll` on `marker`
3 `auto` on `marker`
pointer-events Not planned
shape-rendering 100% 100% 100% 88% 0% 100% 0%
1 `auto` on circle
2 `optimizeSpeed` on circle
3 `crispEdges` on circle
4 `geometricPrecision` on circle
5 `optimizeSpeed` on text
6 On horizontal line
7 Inheritance
8 Path with marker
stop-color 100% 100% 100% 100% 100% 100% 100%
1 Simple case
stop-opacity 100% 100% 100% 100% 100% 100% 100%
1 Simple case
stroke 84% 100% 100% 68% 58% 84% 26%
1 Named color
2 Linear gradient
3 Radial gradient
4 Pattern
5 FuncIRI to unsupported element
6 `none`
7 Linear gradient on text
8 Radial gradient on text
9 Pattern on text
10 Gradient with `objectBoundingBox` on shape without a bbox
11 Gradient with `objectBoundingBox` and fallback on lines
12 Pattern with `objectBoundingBox` on shape without a bbox
13 Pattern with `objectBoundingBox` and fallback on null shape
14 Gradient with `objectBoundingBox` on path without a bbox (1)
15 Gradient with `objectBoundingBox` on path without a bbox (2)
16 Control points clamping (1)
17 Control points clamping (2)
18 Line as curve (1)
19 Line as curve (2)
stroke-dasharray 100% 100% 100% 100% 60% 90% 60%
1 None
2 Even list
3 Odd list
4 Even list with %
5 Even list with `em`
6 Even list with `mm`
7 Negative values (UB) ? ? ? ? ? ?
8 Zero sum
9 Negative sum (UB) ? ? ? ? ? ?
10 comma-ws separator
11 ws separator
12 On a circle
stroke-dashoffset 100% 100% 83% 100% 67% 100% 50%
1 Default
2 `px` value
3 `mm` value
4 `em` value
5 `%` value
6 Negative value
stroke-linecap 100% 100% 100% 100% 89% 89% 44%
1 `butt`
2 `round`
3 `square`
4 Zero length path with `round`
5 Zero length path with `square`
6 Zero length path with `butt`
7 Open path with `butt`
8 Open path with `round`
9 Open path with `square`
stroke-linejoin 100% 100% 100% 100% 100% 100% 100%
1 `miter`
2 `round`
3 `bevel`
stroke-miterlimit 100% 100% 100% 100% 40% 80% 60%
1 Default
2 Valid value
3 Invalid value
4 Value with mm
5 Value with %
stroke-opacity 100% 100% 100% 100% 100% 83% 50%
1 Half opacity
2 With `opacity`
3 With `linearGradient`
4 With `pattern`
5 Nested
6 On text
stroke-width 100% 100% 100% 100% 75% 100% 75%
1 Default
2 Bold
3 Zero
4 Negative (UB) ? ? ? ? ? ? ?
5 Percentage
text-anchor 83% 75% 92% 83% 67% 67% 50%
1 `start` on `text`
2 `middle` on `text`
3 `end` on `text`
4 Invalid value on `text`
5 On `tspan`
6 On `tspan` with arabic
7 Inheritance (1)
8 Inheritance (2)
9 Coordinates list
10 Inheritance (3)
11 `text-anchor` not on text chunk
12 On the first `tspan`
text-decoration 100% 100% 64% 43% 64% 7% 0%
1 `underline`
2 `overline`
3 `line-through`
4 All types
5 Style resolving (1)
6 Style resolving (2)
7 Style resolving (3)
8 `tspan` decoration
9 `underline` with `y` list
10 `underline` with `dy` list (1)
11 `underline` with `dy` list (2)
12 `underline` with `rotate` list (3)
13 `underline` with `rotate` list (4)
14 Outside the `text` element
text-rendering 80% 0% 60% 80% 0% 0% 0%
1 `optimizeSpeed`
2 `optimizeLegibility`
3 `geometricPrecision`
4 On `tspan`
5 With underline
unicode-bidi 0% 100% 100% 100% 0% 0% 0%
1 `bidi-override`
visibility 100% 100% 100% 86% 0% 14% 14%
1 `hidden` on shape
2 `hidden` on group
3 `hidden` on `tspan`
4 `collapse` on `tspan`
5 BBox impact (1)
6 BBox impact (2)
7 BBox impact (3)
word-spacing 0% 83% 0% 100% 83% 0% 0%
1 `normal`
2 `10`
3 `-5`
4 `0`
5 `5%`
6 `2mm`
7 Large negative (UB) ? ? ? ? ? ? ?
writing-mode 6% 76% 94% 59% 82% 76% 6%
1 `lr-tb`
2 `lr`
3 `rl-tb`
4 `rl`
5 `tb-rl`
6 `tb`
7 Invalid value
8 Inheritance
9 On `tspan`
10 `tb` with alignment
11 Arabic with `rl`
12 Japanese with `tb`
13 Mixed languages with `tb`
14 Mixed languages with `tb` and underline
15 `tb` and punctuation
16 `tb` with rotate
17 `tb` with rotate and underline ? ? ? ? ? ? ?

Other

# Feature resvg Chrome Firefox Batik Inkscape librsvg QtSvg
systemLanguage 100% 30% 100% 90% 100% 70% 60%
1 en
2 en-US
3 en-GB
4 ru-Ru
5 ru, en
6 on `defs`
7 on `linearGradient`
8 on `clipPath`
9 on `tspan`
10 on `svg`
style 100% 100% 100% 100% 100% 50% 50%
1 Simple case
2 Comments
transform 100% 100% 100% 100% 100% 100% 100%
1 `matrix(a, b, c, d, e, f)`
2 `translate(tx, ty)`
3 `translate(tx)`
4 `scale(sx, sy)`
5 `scale(sx)`
6 `rotate(angle)`
7 `rotate(angle, cx, cy)`
8 `skewX(angle)`
9 `skewY(angle)`
10 Direct transform
11 Nested transforms (1)
19 Nested transforms (2)
12 Transform list
13 `matrix(a b c d e f)`
14 Extra spaces
15 matrix(0, 0, 0, 0, 0, 0)
16 matrix(1, 0, 0, 1, 0, 0)
17 Numeric character references
18 Empty

Tests

Test files can be found here.

Naming convention: type-name-###.svg

type can be either a(attribute) or e(element).

For example the polyline - 3. Ignore odd points will lead to e-polyline-003.svg.

Additional notes

  • batik doesn’t support anti-aliasing during clipPath, but we are ignoring this.

  • batik doesn’t support text shaping, so characters will be aligned incorrectly, but we are ignoring this because otherwise we have to mark all text-based test as failed, which is not fair.

  • All libraries are rendering text a bit different. We do not treat this as an error.

  • Some tests are marked as UB (undefined behavior). This means that I don’t know how the correct result should look like. Usually, all libraries will render those files differently. Those tests are marked as Unknown, but they must not crash anyway.

  • Every application and library are rendering the basic shapes a bit differently. We do not treat this as an error. shapes diff