Ticket #113 (closed enhancement: fixed)

Opened 9 months ago

Last modified 2 months ago

xmlroff should support SVG images

Reported by: lleroy Assigned to:
Priority: minor Milestone: xmlroff 0.6.1
Component: libfo Version: 0.5.x
Keywords: Cc:
Blocking:

Description

The following statement in docbook does not work...

<imagedata format="SVG" fileref="image.svg"/>

Attachments

xmlroff-svgrender.zip (30.2 kB) - added by lleroy on 03/13/08 13:41:25.
proof of concept implementation

Change History

03/05/08 09:18:59 changed by tkg

  • type changed from defect to enhancement.
  • summary changed from external image in svg format not working to xmlroff should support SVG images.

SVG support is not required by the XSL Recommendation.

(follow-up: ↓ 3 ) 03/05/08 09:35:49 changed by lleroy

  • status changed from new to closed.
  • resolution set to invalid.

I was missing the package svg-gdk-pixbuf-loader...

sorry for the noise

(in reply to: ↑ 2 ) 03/05/08 09:48:16 changed by tkg

Replying to lleroy:

I was missing the package svg-gdk-pixbuf-loader... sorry for the noise

Since I had never heard of svg-gdk-pixbuf-loader and didn't realise that it was an option, this is anything but noise.

Where is it from, and does xmlroff render SVG once it is installed?

03/05/08 13:21:22 changed by lleroy

I'm using MSYS on windows.

svg-gdk-pixbuf-loader is installed as part of librsvg. and it is a plug-in for GDK to load SVG images.

I installed mine from: http://ftp.gnome.org/pub/gnome/binaries/win32/librsvg/2.16/

actually, I'm now trying to get a png to render first...

(follow-up: ↓ 6 ) 03/11/08 11:12:25 changed by lleroy

  • status changed from closed to reopened.
  • resolution deleted.

(reopening)

using librsvg is less-than-satisfactory.

Ideally, the svg file should not be converted to a bitmap, but rendered by cairo... if the backend is vector-capable (eg. PDF, PS, SVG), the output should be vector-based rather than bitmap-based.

(in reply to: ↑ 5 ) 03/11/08 12:20:57 changed by tkg

Replying to lleroy:

Ideally, the svg file should not be converted to a bitmap, but rendered by cairo... if the backend is vector-capable (eg. PDF, PS, SVG), the output should be vector-based rather than bitmap-based.

AFAICT, Cairo can't render a vector surface onto another surface (of any type).

(follow-up: ↓ 10 ) 03/11/08 14:35:39 changed by lleroy

librsvg can render an SVG file onto a CAIRO surface.

(basically, the gdk-pixbuf-loader for svg renders

librsvg/rsvg-convert.c is a command-line utility to convert SVG to PS/PDF/SVG/PNG ... so this should be feasible.

03/13/08 13:41:25 changed by lleroy

  • attachment xmlroff-svgrender.zip added.

proof of concept implementation

07/09/08 13:53:59 changed by tkg

  • milestone set to xmlroff 0.6.1.

08/26/08 14:08:46 changed by tkg

xmlroff should also support inline SVG, e.g., DocBook testdocs/tests/svg/svg.001

(in reply to: ↑ 7 ; follow-up: ↓ 11 ) 09/01/08 09:00:26 changed by tkg

Replying to lleroy:

librsvg can render an SVG file onto a CAIRO surface. (basically, the gdk-pixbuf-loader for svg renders librsvg/rsvg-convert.c is a command-line utility to convert SVG to PS/PDF/SVG/PNG ... so this should be feasible.

I applied your patch, but the SVG still looks rasterised to me.

(in reply to: ↑ 10 ) 09/01/08 09:02:34 changed by tkg

Replying to tkg:

Replying to lleroy:

librsvg can render an SVG file onto a CAIRO surface. (basically, the gdk-pixbuf-loader for svg renders librsvg/rsvg-convert.c is a command-line utility to convert SVG to PS/PDF/SVG/PNG ... so this should be feasible.

I applied your patch, but the SVG still looks rasterised to me.

I take that back. I was using the wrong backend. Sorry.

09/11/08 14:27:18 changed by tkg

(In [479]) Vector SVG images for Cairo backend. (Re #113, lleroy)

09/14/08 08:52:58 changed by tkg

(In [486]) Not setting HAVE_RSVG when don't have librsvg. Re #113.

09/24/08 09:27:54 changed by tkg

  • status changed from reopened to closed.
  • resolution set to fixed.

'instream' SVG is #132.