README.md 5.54 KB
Newer Older
1 2 3
Librsvg
=======

4 5 6 7 8
This is librsvg - A small library to render Scalable Vector Graphics
([SVG][svg]), associated with the [GNOME Project][gnome].  It renders
SVG files to [Cairo][cairo] surfaces.  Cairo is the 2D, antialiased
drawing library that GNOME uses to draw things to the screen or to
generate output for printing.
9 10

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

13
***GITHUB WILL DELETE YOUR PULL REQUESTS!***  We use
14 15 16
[`gitlab.gnome.org`](https://gitlab.gnome.org/GNOME/librsvg) instead.
Please see [`CONTRIBUTING.md`][contributing] for details.

17 18 19
Using librsvg
-------------

20 21 22 23 24 25 26
**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`][compiling] file.

27 28 29 30 31 32 33 34 35 36 37 38
**Documentation:** You can read the [documentation for librsvg][docs] at
developer.gnome.org.  Please [tell us][mail] 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][bugs].  Please see the "[reporting bugs][reporting-bugs]"
section in the file [CONTRIBUTING.md][contributing] to see how to
provide a good bug report.

**Asking questions:** Feel free to ask questions about using librsvg
in the [desktop-devel-list][d-d-l] mailing list.

39 40 41 42
**Programming languages:** Librsvg exports its API through [GObject
Introspection][gi].  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.
43 44 45 46

Contributing to librsvg's development
-------------------------------------

47
There is a code of conduct for contributors to librsvg; please see the
48
file [`code-of-conduct.md`][coc].
49

50
For information on how to report bugs, or how to contribute to librsvg
51
in general, please see the file [`CONTRIBUTING.md`][contributing].
52 53 54 55 56

Goals of librsvg
----------------

Librsvg aims to be a low-footprint library for rendering SVG images.
57 58 59 60 61
It is used primarily in the [GNOME project](https://www.gnome.org) 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.
62 63

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

66
Feature additions will be considered on a case-by-case basis.
67 68 69 70 71 72 73 74

Non-goals of librsvg
--------------------

We don't aim to:

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

75
* Implement scripting or external access to the SVG's DOM.
76 77

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

* Replace the industrial-strength SVG rendering machinery in modern
  web browsers.
82 83 84 85 86

Of course, [contributions are welcome][contributing].  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!

87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125
Who uses librsvg?
-----------------

Librsvg is part of the [GNOME platform][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.*

126 127 128 129 130 131 132 133 134

Presentations on librsvg
------------------------

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

135 136 137
Maintainers
-----------

138 139 140 141 142 143 144 145 146 147 148 149
The maintainer of librsvg is [Federico Mena Quintero][federico].  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][mail] 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][mail] and we can arrange a time.
150

151
[svg]: https://en.wikipedia.org/wiki/Scalable_Vector_Graphics
152 153
[gnome]: https://www.gnome.org/
[cairo]: https://www.cairographics.org/
154
[coc]: code-of-conduct.md
155 156
[autotools]: https://autotools.io/index.html
[compiling]: COMPILING.md
157 158
[docs]: https://developer.gnome.org/rsvg/stable/
[mail]: mailto:federico@gnome.org
159
[bugs]: https://gitlab.gnome.org/GNOME/librsvg/issues
160
[gi]: https://wiki.gnome.org/Projects/GObjectIntrospection
161 162 163 164
[contributing]: CONTRIBUTING.md
[reporting-bugs]: CONTRIBUTING.md#reporting-bugs
[d-d-l]: https://mail.gnome.org/mailman/listinfo/desktop-devel-list
[federico]: https://people.gnome.org/~federico/
165
[platform]: https://developer.gnome.org/
166
[guadec-presentation]: https://people.gnome.org/~federico/blog/docs/fmq-porting-c-to-rust.pdf