Questions tagged [librsvg]

librsvg is a library to render SVG files using cairo.

librsvg is a library to render SVG files using cairo. Additionally, using various tools you can create and manipulate SVG objects.

67 questions
3
votes
0 answers

Create SVG With Text only, width and height based on text size using librsvg?

I am trying to create an svg with one single text element. The size of the svg should be determined solely by the font size of the text, and it should fit the text perfectly. The closest I have come to what I am looking for is this: …
adam tropp
  • 674
  • 7
  • 22
3
votes
2 answers

Convert SVG to PNG with sharp edges

I need to convert images for object detection. I start with svg images with multiple polygons. Example:
Jason
  • 73
  • 1
  • 7
3
votes
0 answers

Rsvg Convert not working with path text

I'm trying to parse an svg file to png format. This is my svg file: https://cdn-imgs-p.stackprint.net/spree/images/62398/original/preview_01.svg When using rsvg-convert --unlimited preview_01.svg > preview.png, the paths fonts are not being…
Lucas Juarez
  • 137
  • 2
  • 11
3
votes
1 answer

Drawing SVG with cairo, librsvg and delphi, changing colors of all paths

I'm drawing vector image from SVG file to TImage. I want to change color of all paths to different one color at runtime, but folowing code changes color for only first path of SVG. All paths in SVG have same color (black - #000000). Somebody knows,…
vnc
  • 41
  • 5
3
votes
1 answer

centos: linking lib that doesn't have a .pc file for pkg-config

I'm trying to compile svg2pdf on centos. I think I've managed to get the required dependencies installed using yum: sudo yum install librsvg2 sudo yum install cairo The Makefile contains: MYCFLAGS=`pkg-config --cflags librsvg-2.0 cairo-pdf` -Wall…
Paulie
  • 31
  • 3
3
votes
3 answers

How do you convert an SVG image "paths" into separate PNG images?

I've got an SVG image with 67 separate paths. Are there any libraries/tutorials out there that will create a separate raster image such as a PNG for each of those paths, and perhaps name them according to the path id?
btelles
  • 5,390
  • 7
  • 46
  • 78
3
votes
1 answer

Problems with scaling text in SVG for animations

I am using SVG to generate video animations my making a sequence of images and converting that to a video file. One effect I need is to to be able to smoothly pan/zoom text. I'm attempting to do this by applying a transformation to a graphic context…
jdesbonnet
  • 251
  • 3
  • 7
2
votes
1 answer

C++ Cairo + RSVG - Set SVG colour when drawing

I'm trying to draw a single colour SVG onto a Cairo surface but it is being rendered in white where I'd like it to be black. The Cairo surface is an 8-bit alpha surface (CAIRO_FORMAT_A8) so I'm only dealing with grey scale. The image I'm testing it…
GSephElec
  • 79
  • 1
  • 7
2
votes
1 answer

librsvg and cairo; rsvg_handle_render_cairo() fails; what am I doing wrong?

I'm playing around with some code in a project; specifically a function that takes SVG images and makes pngs out of them. I have this: typedef std::vector BinaryBuffer; BinaryBuffer readFile(fs::path const& path) { …
2
votes
0 answers

rsvg-convert pdf and paper size

I use rsvg-convert to convert SVG to PDF (works great, also with huge files). SVG file is scalable and internally i use mm unit, so if document is 1200x1500 for me it is 1.2m wide and 1.5m long. RSVG creates PDF document with paper size 423x529mm…
opio
  • 303
  • 1
  • 13
2
votes
1 answer

Making RSVG properly display text with a fractional size

I'm using librsvg 2.39.0 to render the following SVG file to PNG. Inkscape and Firefox render it without any issues:
Mihai
  • 228
  • 1
  • 9
2
votes
3 answers

Linking Macports libraries to XCode application

I'm trying to distribute my app's dependencies with the app. I've got the macports packages librsvg, boost, and cairo installed 64-bit-only on my Snow Leopard system. When I create an .app bundle of my program, it does not work on machines without…
user424400
2
votes
1 answer

Pango unable to find fonts with librsvg

I'm using librsvg to render an SVG file to a Cairo context. Afterwards I "manually" render some text on top using Pango. When rendering the SVG I get Pango warnings that it could not load the fonts: "couldn't load font "'Calibri' Not-Rotated 16",…
Gigo
  • 3,188
  • 3
  • 29
  • 40
2
votes
0 answers

Using RSVG to convert svg with non-local image

I've got an SVG image as follows that I'm trying to convert to a PNG:
Gordon Williams
  • 1,856
  • 1
  • 17
  • 31
2
votes
1 answer

Why is the deprecated "rsvg_pixbuf_from_file_at_size" faster/more efficient that the non-deprecated method (Cairo)?

I'm using C# and P/Invoke to access the GDK libraries. My goal is to convert an set of SVG files into raster images (specifically, png), and using the GDK libraries seems to be the most reliable/accurate. After doing some reading of the Gnome/Cairo…