Asvgard
High-performance SVG rasterizer written in Rust
🦀 Pure Rust • ⚡ Fast Rendering • 🖼️ Vector Graphics
Quick Start
# Clone the repository
# Run the demo (renders built-in bunny.svg)
Features
- 🚀 Fast Rasterization — Optimized rendering pipeline for vector graphics
- 📐 Smart Transforms — Automatically handles
viewBoxscaling and centering - 🧩 Modular Architecture — Clean separation between
parserandrasterizer - 🖥️ Live Preview — Built-in windowed viewer using
minifb - 🔗 Defs & ID Support — Resolves shared resources and definitions
Architecture
src/
├── parser/ # XML parsing and tag structure
├── rasterizer/ # Drawing logic and pixel buffer management
├── utils/ # Math helpers (Matrices, Transforms)
└── main.rs # Window management and event loop
Fonts & Licenses
Embedded Font
This library includes Cascadia Code Nerd Font Mono for text rendering in SVGs.
- Font: Cascadia Code Nerd Font Mono Regular
- License: SIL Open Font License 1.1 (OFL)
- Copyright:
- © 2019 Microsoft Corporation (Cascadia Code)
- © 2021 Ryan L McIntyre (Nerd Fonts patches)
- License File: See
fonts/LICENSE-OFL.txt
The SIL OFL allows free use, modification, and redistribution. The font is bundled with this library for convenience and does not affect the MIT license of the code.
Links
- Cascadia Code (Original font)
- Nerd Fonts (Patched version)
License
Licensed under the MIT License.