Cargo Features

[dependencies]
svg2pdf = { version = "0.11.0", default-features = false, features = ["text", "image", "filters"] }
default = filters, image, text

These default features are set whenever svg2pdf is added without default-features = false somewhere in the dependency tree.

text default

Enables fontdb, siphasher, subsetter, ttf-parser, and unicode-properties, text of usvg and text of resvg

resvg:

Enables SVG Text support.
Adds around 400KiB to your binary.

Affects render::text, context::Context.fonts

image default filters

Enables image

Affects render::image

filters default = image

Enables tiny-skia and raster-images of resvg

resvg:

Enables decoding and rendering of raster images. When disabled, image elements with SVG data will still be rendered. Adds around 200KiB to your binary.

Affects render::filter

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

resvg filters text