/usvg

C++ SVG library

Primary LanguageC

usvg

usvg? μsvg? micro-svg?

C++ SVG library: reading, writing, modifying, and rendering. Does not support entire SVG specification but should handle most documents correctly.

Features

  • basic CSS support, including dynamic styling
  • SVG font support
  • extension mechanism enabling custom behavior - used by ugui to implement a SVG-based GUI
  • dirty rectangle/damage tracking
  • preserves document structure, including unrecognized attributes and elements

Example

Clone ugui-example, then cd usvg && make to generate Release/usvgtest. Run usvgtest <somefile>.svg to save an image to _out.png and save SVG to _out.svg. This will also compare the rendered image to _ref.png if present.

The makefile currently only supports Linux, but adding other platforms is straightforward - see Makefile in nanovgXC

Dependencies