xmlgraphics-batik-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thomas.dewe...@kodak.com
Subject Re: Problems with converting SVG to PNG.
Date Fri, 02 Dec 2005 11:07:48 GMT
Hi Subhro,

"Subhrajyoti Moitra" <smoitra@sapient.com> wrote on 12/02/2005 05:14:33 

> I am converting an SVG image obtained from Adobe Illustrator. 
> I get a NullPointerException when I am trying to convert from SVG to 
PNG. On 
> further investigation I found out that the image uses custom fonts.
> How do we handle custom fonts in SVG? 

   The only required format for fonts in SVG is SVG fonts ;)

   Batik also supports TrueType (and rumor has it Type1 on Java 5).

   Illustrator uses something called CEF (CFF?) when it embeds fonts,
which is a weird TrueType wrapper around Type1 Font data.  Recent
versions of Batik shouldn't generate an NPE on encountering such a
thing.  I think it will warn and then ignore the font.  If you are
getting the error with Batik 1.6 it would be helpful if you could
provide the stack trace.

   Anyway if you don't mind modifying the SVG file you can replace 
the @font-face 'src' property with a url pointing to the actual 
TrueType file and it should work.  You could also convert the font 
to SVG using the ttf2svg converter that is part of the Batik package 
and reference the generated svg font file.

To unsubscribe, e-mail: batik-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: batik-users-help@xmlgraphics.apache.org

View raw message