Hi Subhro, "Subhrajyoti Moitra" <[EMAIL PROTECTED]> wrote on 12/02/2005 05:14:33 AM:
> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
