Cargo Features
[dependencies]
svg2pdf = { version = "0.12.0", default-features = false, features = ["image", "filters", "text"] }
- default = filters, image, text
-
These default features are set whenever
svg2pdf
is added without
somewhere in the dependency tree.default-features = false - image default filters
-
Enables image
Affects
render::image
… - filters default = image
-
Enables tiny-skia and raster-images of resvg ^0.43
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
… - text default
-
Enables fontdb ^0.21, siphasher, subsetter, and ttf-parser ^0.24.1, text of usvg ^0.43 and text of resvg ^0.43
resvg:
Enables SVG Text support.
Adds around 400KiB to your binary.Affects
render::text
,context::Context.fonts
…
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
-
Enables resvg ^0.43