GDNative addon for dynamic svg rendering.
Please use "gdextension" branch for Godot 4.
git clone https://github.com/heppocogne/godot-svgsprite --recursive
cd godot-svgsprite
Build godot-cpp library
For more information, please check the official documentation.
(Current directory=project root)
cd cpp/godot-cpp
scons platform=<platform> generate_bindings=yes target=debug/release
(wait a minute)
cd ../
mkdir lunasvg_build
cd lunasvg_build
cmake -DCMAKE_BUILD_TYPE=Debug/Release -G Ninja ../lunasvg
ninja
cd ../../
mkdir bin
scons platform=<platform> target_name=libgodot-svgsprite target=debug/release
When you export your project or resource package(*.pck,*.zip), make sure to add *"_rawsvg/" folder as a "non-resource folder"**.
Note that this addon uses lunasvg for svg rasterization, but godot3.x uses nanosvg, so the rendering result may not be the same.