Files
qbz/crates/vendor/femtovg-0.23.2
vicrodh 1adf4e6f9d fix(renderer): partial-render blockers from adversarial review (#617)
B1: femtovg Canvas::set_size queues SetRenderTarget(Screen) without
updating current_render_target — the scene set_render_target() was
silently undone and the Copy blit overwrote the frame with the empty
persistent texture (black window on the first env-gated frame).
Root-fixed in vendored femtovg (keep the field in sync with the queued
command — upstream-able) + re-assert the scene target after the
notifier block's set_size.

B2: BoxShadow/Transform/Opacity/Layer/Clip bypass the proxy's
filter_item and re-render every frame (core item_rendering.rs:209-217)
— with a multi-rect dirty region they re-blended over uncleared pixels
in the gaps between rects (progressive smear). Collapse the dirty
region to its single bounding rect so filter, scissor and clears all
agree on one rect.

M1: visualize outline now strokes on the swapchain after the blit
(drawn into the persistent texture it accumulated).

Also: case-insensitive env parsing; stale-comment corrections.

km
2026-07-19 16:08:02 -06:00
..

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: