I'm currently using Batik to convert some vector graphic images in a proprietary format in SVG images. This format also defines vector Fonts in a specific way.
In order to convert the proprietary data, i parse the file to produce a Java drawing in a SVGGraphics2D graphics. All is working fine, but I have a problem with my Fonts. There is no SVG Font deriving from the Java Font class, so I'm not able to render correctly the Fonts without specific XML manipulations in the file.
My question is :
* do I have to subclass the SVGGraphics2D class in order to be able to set and get SVGFonts, and code the specific rendering of these font * or is it better (and possible) to derive a new type of Font form the AWT Font class, that is for example AWTSVGFont, and use it like any other AWT Font ?
Hi Hervé,
Well it would probably be best to do this. If you look there is a class 'batik.svggen.SVGFont' Which is actually a 'font converter' that converts a font to SVG. So you could create a subclass of Font and then subclass SVGFont to recognise your special font and generate the SVGFont definition (this would avoid the need to implement the complete Font interface for the proprietary font).
* or is there an alternative better solution ?
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]