W3C home > Mailing lists > Public > www-svg@w3.org > June 2018

Re: converting SVG to PNG

From: Liam R. E. Quin <liam@w3.org>
Date: Tue, 12 Jun 2018 11:19:24 -0400
Message-ID: <4981469ec24741a076e68ff301e848a0cd1b5b2b.camel@w3.org>
To: vinayak datir <vinay_datir@yahoo.com>, "www-svg@w3.org" <www-svg@w3.org>, "svg-developers@yahoogroups.com" <svg-developers@yahoogroups.com>
On Tue, 2018-06-12 at 13:32 +0000, vinayak datir wrote:
>                 I am using batik-rasterizer-1.9.jar to convert the
> SVG into PNG. Input SVG has the CSS embedded using style tag.

You might find Batik needs style attributes on individual SVG elements
rather than applying CSS selectors automatially.

For example, instead of having
.g {
  font-family: "Alegreya";
  font-size: 12pt;
}

use <g style='font-family: "Alegreya"; font-size: 12pt;'>...

or use SVG attributes:
    <g font-family="Alegreya" font-size="12pt">

In general this is a Batik-specific question so it's best asked on a
list for that software. You could also try in Web browsers and in
Inkscape (which can also make PNG files) to get a feel for whether it's
a problem in your file.

Liam
 
-- 
Liam Quin, W3C staff,  http://www.fromoldbooks.org/

Available for XML/Document/Information Architecture/
XSLT/XQuery/Web/Text Processing work and consulting.
Received on Tuesday, 12 June 2018 15:19:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:55:14 UTC