usvg rendering implementation using the raqote library.
Warning: the raqote library is still in development and pretty unstable.
You should prefer other backends.
This backend intentionally doesn't provide a C API.
Right now, this is the only backend that uses Rust-based 2D library, therefore building process is fairly straightforward.
Sadly, you still need a C++ compiler to build harfbuzz.
Install stable-x86_64-pc-windows-msvc Rust target.
Build using x64 Native Tools Command Prompt for VS 2017 shell:
set PATH=%userprofile%\.cargo\bin;%PATH%
rustup.exe default stable-x86_64-pc-windows-msvc
cargo.exe build --releaseInstall stable-x86_64-pc-windows-gnu Rust target.
And then:
pacman -S mingw-w64-x86_64-gcc
rustup default stable-x86_64-pc-windows-gnu
cargo build --releaseYou can use i686 target in the same way.
Install harfbuzz using your distributive's package manager.
On Ubuntu you can install it via:
sudo apt install libharfbuzz-devBuild resvg:
cargo build --releasecargo build --releaseharfbuzz on Linux. On other OS'es it will be built statically.
cargo run --release -- in.svg out.pngThe resulting binary can be found at: target/release/resvg-raqote
A simple SVG to PNG converter:
cargo run --example minimal -- in.svg out.pngRender image using a manually constructed SVG render tree:
cargo run --example custom_rtreeDraw bounding boxes around all shapes on input SVG:
cargo run --example draw_bboxes -- bboxes.svg bboxes.png -z 4