• Stars
    star
    313
  • Rank 133,714 (Top 3 %)
  • Language
    Rust
  • License
    GNU Lesser Genera...
  • Created over 12 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Read-only mirror of https://gitlab.gnome.org/GNOME/librsvg

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

Generally two branches are supported at any one time:

  • The latest stable branch. See the branches page and look for the one called librsvg-x.yy where the x.yy numbers are highest. You can use this branch safely for production work.

  • The main branch. All development happens here.

Stable branches become unsupported when a new one appears. For example, librsvg-2.55 will become unsupported when librsvg-2.56 appears.

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 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:

  • 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.

"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:

  • Mail me at [email protected].

  • Matrix: I am @federico on the GNOME Hackers and Rust ❤️ GNOME channels on gnome.org's Matrix. 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.

  • I frequently blog about librsvg. You may be interested in the articles about porting librsvg from C to Rust, which happened between 2016 and 2020.

More Repositories

1

gimp

Read-only mirror of https://gitlab.gnome.org/GNOME/gimp
C
4,562
star
2

glib

Read-only mirror of https://gitlab.gnome.org/GNOME/glib
C
1,375
star
3

gtk

Read-only mirror of https://gitlab.gnome.org/GNOME/gtk
C
1,275
star
4

meld

Read-only mirror of https://gitlab.gnome.org/GNOME/meld
Python
949
star
5

vala

Read-only mirror of https://gitlab.gnome.org/GNOME/vala
Vala
786
star
6

gnome-shell

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell
C
715
star
7

libxml2

Read-only mirror of https://gitlab.gnome.org/GNOME/libxml2
C
479
star
8

gedit

Read-only mirror of https://gitlab.gnome.org/GNOME/gedit
C
399
star
9

geary

Read-only mirror of https://gitlab.gnome.org/GNOME/geary
Vala
353
star
10

dia

Read-only mirror of https://gitlab.gnome.org/GNOME/dia
C
324
star
11

nautilus

Read-only mirror of https://gitlab.gnome.org/GNOME/nautilus
C
307
star
12

evince

Read-only mirror of https://gitlab.gnome.org/GNOME/evince
C
301
star
13

gnome-terminal

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-terminal
C++
266
star
14

epiphany

Read-only mirror of https://gitlab.gnome.org/GNOME/epiphany
C
264
star
15

gparted

Read-only mirror of https://gitlab.gnome.org/GNOME/gparted
C++
254
star
16

gnome-builder

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-builder
C
232
star
17

glade

Read-only mirror of https://gitlab.gnome.org/GNOME/glade
C
206
star
18

rhythmbox

Read-only mirror of https://gitlab.gnome.org/GNOME/rhythmbox
C
192
star
19

mutter

Read-only mirror of https://gitlab.gnome.org/GNOME/mutter
C
170
star
20

gitg

Read-only mirror of https://gitlab.gnome.org/GNOME/gitg
Vala
167
star
21

vte

Read-only mirror of https://gitlab.gnome.org/GNOME/vte
C++
161
star
22

gjs

Read-only mirror of https://gitlab.gnome.org/GNOME/gjs
C++
155
star
23

zenity

Read-only mirror of https://gitlab.gnome.org/GNOME/zenity
C
150
star
24

gtkmm

Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm
Scheme
147
star
25

shotwell

Read-only mirror of https://gitlab.gnome.org/GNOME/shotwell
Vala
145
star
26

pygobject

Read-only mirror of https://gitlab.gnome.org/GNOME/pygobject
Python
144
star
27

gthumb

Read-only mirror of https://gitlab.gnome.org/GNOME/gthumb
C
140
star
28

evolution

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution
C
139
star
29

pango

Read-only mirror of https://gitlab.gnome.org/GNOME/pango
C
132
star
30

sushi

Read-only mirror of https://gitlab.gnome.org/GNOME/sushi
C
123
star
31

pitivi

Read-only mirror of https://gitlab.gnome.org/GNOME/pitivi
Python
120
star
32

gnome-music

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-music
Python
119
star
33

adwaita-icon-theme

Read-only mirror of https://gitlab.gnome.org/GNOME/adwaita-icon-theme
Python
113
star
34

gnome-boxes

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-boxes
Vala
112
star
35

baobab

Read-only mirror of https://gitlab.gnome.org/GNOME/baobab
Vala
104
star
36

orca

Read-only mirror of https://gitlab.gnome.org/GNOME/orca
Python
96
star
37

gnome-calendar

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-calendar
C
92
star
38

gdm

Read-only mirror of https://gitlab.gnome.org/GNOME/gdm
C
87
star
39

gnome-desktop

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-desktop
C
86
star
40

ocrfeeder

Read-only mirror of https://gitlab.gnome.org/GNOME/ocrfeeder
Python
84
star
41

gnome-control-center

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-control-center
C
80
star
42

gnome-screenshot

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-screenshot
C
78
star
43

gnumeric

Read-only mirror of https://gitlab.gnome.org/GNOME/gnumeric
C
77
star
44

gvfs

Read-only mirror of https://gitlab.gnome.org/GNOME/gvfs
C
76
star
45

gnome-system-monitor

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-system-monitor
C++
74
star
46

gegl

Read-only mirror of https://gitlab.gnome.org/GNOME/gegl
C
73
star
47

gnome-software

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-software
C
72
star
48

gnome-tweaks

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-tweaks
Python
71
star
49

d-feet

Read-only mirror of https://gitlab.gnome.org/GNOME/d-feet
Python
71
star
50

easytag

Read-only mirror of https://gitlab.gnome.org/GNOME/easytag
C
69
star
51

gnome-multi-writer

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-multi-writer
C
69
star
52

ghex

Read-only mirror of https://gitlab.gnome.org/GNOME/ghex
C
66
star
53

glibmm

Read-only mirror of https://gitlab.gnome.org/GNOME/glibmm
Scheme
62
star
54

gobject-introspection

Read-only mirror of https://gitlab.gnome.org/GNOME/gobject-introspection
C
61
star
55

gstreamermm

Read-only mirror of https://gitlab.gnome.org/GNOME/gstreamermm
Scheme
61
star
56

libadwaita

Read-only mirror of https://gitlab.gnome.org/GNOME/libadwaita
C
61
star
57

gnome-calculator

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-calculator
Vala
61
star
58

gnome-maps

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-maps
JavaScript
60
star
59

tracker

Read-only mirror of https://gitlab.gnome.org/GNOME/tracker
C
59
star
60

polari

Read-only mirror of https://gitlab.gnome.org/GNOME/polari
JavaScript
58
star
61

cheese

Read-only mirror of https://gitlab.gnome.org/GNOME/cheese
C
58
star
62

rygel

Read-only mirror of https://gitlab.gnome.org/GNOME/rygel
Vala
58
star
63

libsoup

Read-only mirror of https://gitlab.gnome.org/GNOME/libsoup
C
57
star
64

gnome-backgrounds

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-backgrounds
Meson
56
star
65

evolution-ews

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution-ews
C
56
star
66

brasero

Read-only mirror of https://gitlab.gnome.org/GNOME/brasero
C
55
star
67

gnome-disk-utility

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-disk-utility
C
54
star
68

gtksourceview

Read-only mirror of https://gitlab.gnome.org/GNOME/gtksourceview
C
54
star
69

dasher

Read-only mirror of https://gitlab.gnome.org/GNOME/dasher
C
54
star
70

gnote

Read-only mirror of https://gitlab.gnome.org/GNOME/gnote
C++
53
star
71

libxslt

Read-only mirror of https://gitlab.gnome.org/GNOME/libxslt
HTML
53
star
72

totem

Read-only mirror of https://gitlab.gnome.org/GNOME/totem
C
52
star
73

libnotify

Read-only mirror of https://gitlab.gnome.org/GNOME/libnotify
C
51
star
74

gnome-shell-extensions

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-shell-extensions
JavaScript
50
star
75

simple-scan

Read-only mirror of https://gitlab.gnome.org/GNOME/simple-scan
Vala
48
star
76

file-roller

Read-only mirror of https://gitlab.gnome.org/GNOME/file-roller
C
48
star
77

libsecret

Read-only mirror of https://gitlab.gnome.org/GNOME/libsecret
C
46
star
78

cantarell-fonts

Read-only mirror of https://gitlab.gnome.org/GNOME/cantarell-fonts
Python
45
star
79

jhbuild

Read-only mirror of https://gitlab.gnome.org/GNOME/jhbuild
Python
44
star
80

gnome-settings-daemon

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-settings-daemon
C
44
star
81

recipes

Read-only mirror of https://gitlab.gnome.org/GNOME/recipes
C
43
star
82

eog

Read-only mirror of https://gitlab.gnome.org/GNOME/eog
C
41
star
83

seahorse

Read-only mirror of https://gitlab.gnome.org/GNOME/seahorse
C
39
star
84

fractal

Read-only mirror of https://gitlab.gnome.org/GNOME/fractal
Rust
38
star
85

evolution-activesync

Read-only mirror of https://gitlab.gnome.org/GNOME/evolution-activesync
C
38
star
86

gnome-chess

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-chess
Vala
37
star
87

gnome-commander

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-commander
C++
36
star
88

libgda

Read-only mirror of https://gitlab.gnome.org/GNOME/libgda
C
35
star
89

alacarte

Read-only mirror of https://gitlab.gnome.org/GNOME/alacarte
Python
34
star
90

nautilus-python

Read-only mirror of https://gitlab.gnome.org/GNOME/nautilus-python
C
33
star
91

msitools

Read-only mirror of https://gitlab.gnome.org/GNOME/msitools
C
33
star
92

gtkmm-documentation

Read-only mirror of https://gitlab.gnome.org/GNOME/gtkmm-documentation
Python
32
star
93

dconf-editor

Read-only mirror of https://gitlab.gnome.org/GNOME/dconf-editor
Vala
31
star
94

libgsf

Read-only mirror of https://gitlab.gnome.org/GNOME/libgsf
C
31
star
95

devhelp

Read-only mirror of https://gitlab.gnome.org/GNOME/devhelp
C
30
star
96

gedit-plugins

Read-only mirror of https://gitlab.gnome.org/GNOME/gedit-plugins
Python
27
star
97

metacity

Read-only mirror of https://gitlab.gnome.org/GNOME/metacity
C
27
star
98

sysprof

Read-only mirror of https://gitlab.gnome.org/GNOME/sysprof
C
26
star
99

gdk-pixbuf

Read-only mirror of https://gitlab.gnome.org/GNOME/gdk-pixbuf
C
25
star
100

gnome-online-accounts

Read-only mirror of https://gitlab.gnome.org/GNOME/gnome-online-accounts
C
25
star