LIBRSVG 2.62.6
C library for rendering SVG
Loading...
Searching...
No Matches
librsvg

librsvg is a C library that loads SVG and SVGZ and draws it onto a Cairo surface. The shared library, headers, and pkg-config module are librsvg-2.0. This is the public C API for librsvg 2.62.6.

It handles non-animated SVG, CSS styling, filters, masks, clip paths, and SVG <image> rasters (PNG, JPEG, GIF, WebP, BMP; optional AVIF). A gdk-pixbuf loader and rsvg-convert are included. See the examples.

Limits

File nesting (XInclude, cross-document references, CSS @import) is limited to 20. Exceeding it is a load error. RSVG_HANDLE_FLAG_UNLIMITED does not lift this limit.

Layer nesting during drawing is limited to 500 discrete layers on glibc and 50 on musl. Path and text coordinates outside Cairo's 24.8 fixed-point range are skipped.

SVG <image> rasters: maximum side 32767 pixels (never raised). Decoded pixels default 128 MiB; data: URI size default 64 MiB. RSVG_HANDLE_FLAG_UNLIMITED raises those heap caps to 512 MiB and 256 MiB. Very large stylesheet buffers may be rejected.

API groups

The last new public C function is rsvg_handle_set_cancellable_for_rendering (2.59). The library version is 2.62.6.

Thank you — the people who built librsvg.

Licence

The library (librsvg-2.so) is licensed under the GNU Library General Public License, version 2 or later. You may link this library from other programs; the library itself stays under this license. The full text is LICENCE-LIB.

The command-line tools (rsvg-convert and similar) are licensed under the GNU General Public License, version 2. The full text is LICENCE.

Building this HTML

Doxygen is required. From the project root:

doxygen doc/Doxyfile

or make html. Either command writes doc/html/index.html.