Switch branches/tags
Clone or download
Permalink
Failed to load latest commit information.
doc defs: port RsvgDefs to rust Jul 29, 2018
gdk-pixbuf-loader Makefile: fix VPATH (out-of-tree) builds. Jun 11, 2018
librsvg (#334): Preserve the cairo_t's transformation matrix during rendering Oct 9, 2018
m4 Install the tests Oct 22, 2015
rsvg_internals Remove unused #[repr(C)] Oct 11, 2018
tests (#334): Preserve the cairo_t's transformation matrix during rendering Oct 9, 2018
tools rsvg-dimensions.c: Be clear on whether a fragment is not found, or wh… Sep 25, 2018
win32 win32/rsvg-rust.mak: Fix 'clean' target Feb 23, 2018
.gitignore Add windows tests Jun 11, 2018
.gitlab-ci.yml CI: Minor yaml formatting change Oct 11, 2018
.rustfmt.toml rustfmt Jun 5, 2018
ARCHITECTURE.md drawing_ctx: move push/pop state to rust Apr 1, 2018
AUTHORS Update AUTHORS from the whole git log Dec 16, 2016
COMPILING.md Tree leak Aug 29, 2018
CONTRIBUTING.md CONTRIBUTING.md: Update rustfmt documentation Sep 15, 2018
COPYING build out of srcdir; bug 158331 Oct 7, 2005
COPYING.LIB Add to make rpm happy. Apr 3, 2001
Cargo.lock Use the language_tags crate Oct 4, 2018
Cargo.toml Include Rust debuginfo in release builds Jul 12, 2018
ChangeLog.old Automatically generate ChangeLog from git history Sep 6, 2011
INSTALL build out of srcdir; bug 158331 Oct 7, 2005
MAINTAINERS Update NEWS and librsvg.doap; add MAINTAINERS Feb 11, 2015
Makefile.am Remove rsvg-styles.c - yay! Sep 26, 2018
NEWS Update NEWS Sep 24, 2018
README.md Punctuation fix. Jun 4, 2018
Rsvg-2.0-custom.vala Update Vala deprecation syntax Feb 23, 2018
Rsvg-2.0.metadata Add Vala bindings Jun 19, 2012
acinclude.m4 Use -Bsymbolic-functions when available Nov 11, 2011
appveyor.yml Add windows tests Jun 11, 2018
autogen.sh autogen.sh: Replace deprecated gnome-autogen.sh with standard autotools Feb 8, 2016
cargo-vendor-config Move everything under rust/ one level up in the hierarchy Feb 23, 2018
code-of-conduct.md Update code-of-conduct.md to 1.4.1 Feb 2, 2018
config.h.win32.in Implement svg switch conditions in rust Mar 17, 2018
configure.ac Bump version to 2.45.0 Aug 28, 2018
glib-tap.mk Install the tests Oct 22, 2015
librsvg-uninstalled.pc.in Hard-depend on libcroco Nov 7, 2011
librsvg-zip.in Pick headers and loader DLL from correct places into zip package Dec 27, 2010
librsvg.doap Change git and bugzilla URLs to gitlab Dec 14, 2017
librsvg.pc.in Hard-depend on libcroco Nov 7, 2011
rsvg-convert.1 Document SOURCE_DATE_EPOCH in rsvg-convert's man page Feb 13, 2018
rsvg-convert.c rsvg-convert: Exit when we cannot render a file successfully Aug 21, 2018
rsvg-view.c Move the C part of the library to a librsvg/ subdirectory Feb 23, 2018
rsvg.symbols rsvg.symbols: Fix typo Jan 19, 2018
tap-driver.sh Install the tests Oct 22, 2015
tap-test Install the tests Oct 22, 2015

README.md

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.

GITHUB WILL DELETE YOUR PULL REQUESTS! We use gitlab.gnome.org instead. Please see CONTRIBUTING.md for details.

Using librsvg

Compiling: Librsvg uses a mostly normal autotools setup. You may run into some peculiarities due to the Rust internals library if you are cross-compiling or if you are in a build system with no network access, or if you are building binary packages from a librsvg tarball. In those cases, please refer to the COMPILING.md file.

Documentation: You can read the documentation for librsvg at developer.gnome.org. Please tell us 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" section in the file CONTRIBUTING.md to see how to provide a good bug report.

Asking questions: Feel free to ask questions about using librsvg in the desktop-devel-list mailing list.

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.

Contributing to librsvg's development

There is a code of conduct for contributors to librsvg; please see the file code-of-conduct.md.

For information on how to report bugs, or how to contribute to librsvg in general, please see the file CONTRIBUTING.md.

Goals of librsvg

Librsvg aims to be a low-footprint library for rendering SVG 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.

Non-goals of librsvg

We don't aim to:

  • Implement every single SVG feature that is in the spec.

  • Implement scripting or external access to the SVG's DOM.

  • Implement support for CSS-based animations (but if you can think of a nice API to do this, we would be glad to know!)

  • Replace the industrial-strength SVG rendering machinery in modern web browsers.

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:

  • Loads SVGs from the generic gdk-pixbuf loader infrastructure, so any application which uses gdk-pixbuf can load SVGs as if they were raster images.

  • Loads SVG icons for the desktop.

  • Creates SVG thumbnails for the file manager.

  • Loads SVGs within GNOME's default image viewer, Eye of Gnome.

Outside of GNOME's core:

  • GNOME games (chess, five-or-more, etc. to draw game pieces)

  • GIMP

  • GCompris

  • Claws-mail

  • Darktable

  • Mate-panel

  • Evas/Enlightenment

  • Emacs

  • ImageMagick

  • Wikipedia, to render SVGs as raster images for old browsers. Special thanks to Wikimedia for providing excellent bug reports.

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.

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:

  • Mail me at federico@gnome.org.

  • IRC: I am federico on irc.gnome.org in the #rust or #gnome-hackers channels. I'm there most weekdays (Mon-Fri) starting at about UTC 14:00 (that's 08:00 my time; I am in the UTC-6 timezone). If this is not a convenient time for you, feel free to mail me and we can arrange a time.