Cargo Features

[dependencies]
svgr = { version = "0.30.0", default-features = false, features = ["filter", "text", "system-fonts", "memmap-fonts", "raster-images", "dump-svg"] }
default = filter, memmap-fonts, raster-images, system-fonts, text

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

filter default = svgfilters

Enables SVG Filter support.
Adds around 100KiB to your binary.

Required by the binary

text default = usvgr-text-layout

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

Required by the binary

system-fonts default

Enables system fonts loading (only for text).

Enables system-fonts of usvgr-text-layout

Required by the binary

memmap-fonts default

Enables font files memmaping for faster loading (only for text).

Enables memmap-fonts of usvgr-text-layout

Required by the binary

raster-images default = gif, jpeg-decoder, png

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

dump-svg

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.

gif raster-images

Enables gif ^0.11

jpeg-decoder raster-images
png raster-images

Enables png =0.17.6

pin version to match flate2 miniz_oxide version

svgfilters filter
usvgr-text-layout memmap-fonts system-fonts text