61 releases (22 breaking)

0.23.1 Mar 31, 2026
0.22.0 Mar 26, 2026
0.19.3 Oct 13, 2025
0.15.0 Jul 3, 2025
0.1.0 Sep 28, 2020

#22 in Graphics APIs

Download history 17266/week @ 2025-12-20 17011/week @ 2025-12-27 18318/week @ 2026-01-03 18750/week @ 2026-01-10 21816/week @ 2026-01-17 21136/week @ 2026-01-24 21755/week @ 2026-01-31 17401/week @ 2026-02-07 19080/week @ 2026-02-14 18489/week @ 2026-02-21 19707/week @ 2026-02-28 21935/week @ 2026-03-07 20757/week @ 2026-03-14 24628/week @ 2026-03-21 26914/week @ 2026-03-28 24522/week @ 2026-04-04

99,566 downloads per month
Used in 38 crates (15 directly)

MIT/Apache

450KB
10K SLoC

Crates.io API dependency status rust: 1.70 Discord

femtovg

GPU Antialiased 2D vector drawing library written in Rust.


Ported from https://github.com/memononen/nanovg

Most of the implementation is the same as the original C code with some bug fixes, some features added and several parts have been made more Rust-y. Rendering is done via one OpenGl (ES) 3.0+ backend.

Screenshots

Demo

demo Run with cargo run --example demo

Breakout

breakout Run with cargo run --example breakout

SVG

svg Run with cargo run --example svg

Text

text Run with cargo run --example text

Features

  • Anti-aliasing
  • Bézier paths filling and stroking
  • Solid color and image pattern fills and strokes
  • Gradients - box, linear and radial
  • Stroke width and miterlimit
  • Stroke caps: butt, round and square
  • Stroke joins: miter, round and bevel
  • Fill rules - EvenOdd/NonZero
  • Rectangle scissoring
  • Composition modes (SourceOver, SourceIn, SourceOut, Atop, etc..)
  • Global alpha
  • Text filling and stroking
  • Text shaping
  • Text alignment: (left center right), (top, middle, alphabetic, bottom)
  • Nearest font matching
  • Path hit testing
  • OpenGl ES2 backend
  • WGPU backend
  • Color fonts

Not supported

  • Stroke dashing
  • Path scissoring
  • Custom shaders
  • 3D transforms

Ecosystem

FemtoVG is used by these projects:

License

Licensed under either of

Fonts used in examples:

Dependencies

~3–23MB
~314K SLoC