Hi Thomas, Thanks for your reply. I'm running batik in 2 places. On a Debian server with no window system, and on my WinXP desktop. I can't run squiggle on the Debian box. I can open the file in squiggle on the win xp box. I also just tried to rasterize it with batik-rasterize on the winxp box and it worked. When I run the same command (with paths adjusted accordingly, but the same command line options), I get a jpg with the correct text, but default fonts.
My font definitions looks like this: <font-face font-family="courier"> <font-face-src> <font-face-uri xlink:href="http://ipi.exobitnetworks.com/fonts/courier.svg#courier" /> </font-face-src> </font-face> And I refer to them in the TEXT element as follows: <text x="-24.85" y="-5.425" fill="#ff0000" font-family="Tahoma" font-size="9" >tahoma font here</text> I am able to successfully wget the URL of the font on the debian server, so it should be able to access the font definitions it needs. I don't know if this is relevant, but if I add the -validate option I get the following error, and no jpg is generated at all: About to transcode 1 SVG file(s) Converting sign.svg to /data/home/ipi/ipi.exobitnetworks.com/www/test/sign.jpg ... java.io.IOException: The content of element type "g" must match "(desc|title|metadata|defs|path|text|rect|circle|ellipse|line|polyline|polyg on|use|image|svg|g|view|switch|a|altGlyphDef|script|style|symbol|marker|clip Path|mask|linearGradient|radialGradient|pattern|filter|cursor|font|animate|s et|animateMotion|animateColor|animateTransform|color-profile|font-face)*". at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source) at org.apache.batik.dom.util.SAXDocumentFactory.createDocument(Unknown Source) at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) at org.apache.batik.dom.svg.SAXSVGDocumentFactory.createDocument(Unknown Source) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) org.apache.batik.transcoder.TranscoderException: null Enclosed Exception: The content of element type "g" must match "(desc|title|metadata|defs|path|text|rect|circle|ellipse|line|polyline|polyg on|use|image|svg|g|view|switch|a|altGlyphDef|script|style|symbol|marker|clip Path|mask|linearGradient|radialGradient|pattern|filter|cursor|font|animate|s et|animateMotion|animateColor|animateTransform|color-profile|font-face)*". at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.transcode(Unknown Source) at org.apache.batik.apps.rasterizer.SVGConverter.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.execute(Unknown Source) at org.apache.batik.apps.rasterizer.Main.main(Unknown Source) ... error (SVGConverter.error.while.rasterizing.file) -Rob -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 21, 2006 8:02 PM To: [email protected] Cc: [email protected] Subject: Re: Font rasterization issues Hi Rob, "Rob Hinst" <[EMAIL PROTECTED]> wrote on 11/21/2006 09:30:24 AM: > My issue now is as follows. If I use Squiggle to open an svg that > references external fonts and then I export it as a jpeg, the jpeg > displays the fonts correctly. If I use batik-rasterizer from the > command line to rasterize the svg into a jpeg, however, the text > appears to lose it's font definition info. It just shows up in the > default font. This probably indicates that it can't find the external font for some reason. > I've included my exact command string below. > Maybe someone can point out what I'm doing wrong: > /data/jdk1.5.0_08/bin/java -jar > /data/home/ipi/batik-1.6/batik-rasterizer.jar -m "image/jpeg" -q 0.99 > -d "/data/home/ipi/tmp/jpgIn2jZh" "/data/home/ipi/tmp/svgmnB8I4" So to be clear if you type: /data/jdk1.5.0_08/bin/java -jar /data/home/ipi/batik-1.6/batik-squiggle.jar "/data/home/ipi/tmp/svgmnB8I4" It works fine? --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
