Home

Awesome

Librsvg

This is librsvg - A small library to render Scalable Vector Graphics (SVG), associated with the GNOME Project. It renders SVG files to Cairo surfaces. Cairo is the 2D, antialiased drawing library that GNOME uses to draw things to the screen or to generate output for printing.

Do you want to render non-animated SVGs to a Cairo surface with a minimal API? Librsvg may be adequate for you.

Supported SVG/CSS features: Please see the chapter for supported features in the development guide.

PLEASE DO NOT SEND PULL REQUESTS TO GITHUB. We use gitlab.gnome.org instead. Please see Contributing to librsvg for details.

Table of contents:

[[TOC]]

Supported branches

Only these versions are supported:

Older versions are not supported. Please try a newer version before reporting bugs or missing features.

See the policy for supported versions for more details.

Using librsvg

Compiling: Librsvg uses the meson build system. Compile-time options are listed in the file meson_options.txt. Please refer to the Detailed compilation instructions in the development guide.

Documentation: You can read the documentation for librsvg's C API or the Rust API. Please file an issue if you don't find something there that you need.

Bug tracking: If you have found a bug, take a look at our bug tracker. Please see the "reporting bugs" page in the development guide to see how to provide a good bug report.

Asking questions: Feel free to ask questions about using librsvg in the "Platform" category of GNOME's Discourse. You can also ask via chat in the Matrix room for GNOME Rust.

Programming languages: Librsvg exports its API through GObject Introspection. This way, it is available in many programming languages other than C. Please see your language binding's documentation for information on how to load the Rsvg namespace.

Security: For a list of releases with security issues, instructions on reporting security-related bugs, and the security considerations for librsvg's dependencies, see the Security chapter in the development guide.

Contributing to librsvg's development

There is a code of conduct for contributors to librsvg; please see the GNOME Code of Conduct, which is duplicated in the file code-of-conduct.md.

Please see the Development Guide for librsvg on how to contribute to librsvg, how to report bugs, how set up your development environment, and for a description of librsvg's architecture.

Goals of librsvg

Librsvg aims to be a low-footprint library for rendering SVG1.1 and SVG2 images. It is used primarily in the GNOME project to render SVG icons and vector images that appear on the desktop. It is also used in Wikimedia to render the SVG images that appear in Wikipedia, so that even old web browsers can display them. Many projects which casually need to render static SVG images use librsvg.

We aim to be a "render this SVG for me, quickly, and with a minimal API" kind of library.

Feature additions will be considered on a case-by-case basis.

You can read about librsvg's supported SVG and CSS features in the development guide.

Non-goals of librsvg

We don't aim to:

Of course, contributions are welcome. In particular, if you find nice ways of doing the above while still maintaining the existing API of librsvg, we would love to know about it!

Who uses librsvg?

Librsvg is part of the GNOME platform. Inside GNOME, librsvg takes multiple roles:

Outside of GNOME's core:

Presentations on librsvg

"Replacing C library code with Rust: What I learned with librsvg" was presented at GUADEC 2017. It gives a little history of librsvg, and how/why it is being ported to Rust from C.

"Patterns of refactoring C to Rust: the case of librsvg" was presented at GUADEC 2018. It describes ways in which librsvg's C code was refactored to allow porting it to Rust.

Maintainers

The maintainer of librsvg is Federico Mena Quintero. Feel free to contact me for any questions you may have about librsvg, both its usage and its development. You can contact me in the following ways: