You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-users@xmlgraphics.apache.org by Ryan Worley <rw...@webassociates.com> on 2002/03/06 01:26:07 UTC

External font support

Does Batik currently support embedding of external SVG fonts?  I've made
several different attempts using variations of font-face and font-face-uri
but have not have success yet.  Do we have to include the entire SVG font
file in every SVG that uses it?

Thanks for any help.


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


Re: External font support

Posted by Vincent Hardy <vi...@sun.com>.
Ryan,

I suspect you have a problem in either the URI itself (typo) or there
is something wrong in the henhc.svg#HelveticaNeue fragment. I would
suggest doing the following:

a. Try running the examples I sent in my previous email in Cocoon. If 
   they do not work, then there is a problem with Cocoon. If they
   do (as I hope), then this will show there is a problem in the 
   Font usage in your example.

b. Make sure you can view your examples in the Batik viewer before
   running them into Cocoon.

Good luck with your project,
Vincent.

Ryan Worley wrote:
> 
> Thank you for your help, it looks like I'm getting closer although now I am
> getting the following error when trying to view the image.  FYI, I'm using
> Apache Cocoon and am attempting to serialize the created SVG to a PNG.
> 
> FATAL_E (2002-03-06) 09:23.19:765   [core.xslt-processor]
> (/images/level1-off/100/14/PRODUCTS.png)
> HttpProcessor[8080][3]/TraxErrorHandler: Error in TraxTransformer:
> javax.xml.transform.TransformerException:
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
> javax.xml.transform.TransformerException:
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
>  at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
> ava:1230)
>  at
> org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
>  at java.lang.Thread.run(Thread.java:484)
> ---------
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
>  at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:96)
>  at
> org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
> .java:190)
>  at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
> ava:1186)
>  at
> org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
>  at java.lang.Thread.run(Thread.java:484)
> ---------
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
>  at
> org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:230)
>  at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
>  at
> org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
> .java:190)
>  at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
> ava:1186)
>  at
> org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
>  at java.lang.Thread.run(Thread.java:484)
> ---------
> org.apache.batik.transcoder.TranscoderException: null
> Enclosed Exception:
> http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
>  at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
> Source)
>  at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
> Source)
>  at
> org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:226)
>  at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
>  at
> org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
> .java:190)
>  at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
> ava:1186)
>  at
> org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
>  at java.lang.Thread.run(Thread.java:484)
> ---------
> org.apache.batik.bridge.BridgeException: http://xml.apache.org:-1
> An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
> specified on the element <font-face-uri>
>  at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown
> Source)
>  at org.apache.batik.bridge.SVGFontUtilities.getFontFamily(Unknown Source)
>  at org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(Unknown
> Source)
>  at
> org.apache.batik.bridge.SVGTextElementBridge.buildAttributedStrings(Unknown
> Source)
>  at
> org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(Unknown
> Source)
>  at org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(Unknown
> Source)
>  at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
>  at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
>  at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
>  at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
> Source)
>  at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
> Source)
>  at
> org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:226)
>  at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
>  at
> org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
> .java:190)
>  at
> org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
> ava:1186)
>  at
> org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
>  at java.lang.Thread.run(Thread.java:484)
> 
> ----- Original Message -----
> From: "Vincent Hardy" <vi...@sun.com>
> To: "Batik Users" <ba...@xml.apache.org>
> Sent: Tuesday, March 05, 2002 11:52 PM
> Subject: Re: External font support
> 
> > Ryan,
> >
> > Yes, Batik supports external SVG fonts. See the example:
> >
> > samples/tests/spec/fonts/fontExternalFont.svg
> >
> > and:
> >
> > http://nagoya.apache.org/svgfonts/index.svg
> >
> > (to be viewed with Batik).
> >
> > Cheers,
> > Vincent
> >
> > Ryan Worley wrote:
> > >
> > > Does Batik currently support embedding of external SVG fonts?  I've made
> > > several different attempts using variations of font-face and
> font-face-uri
> > > but have not have success yet.  Do we have to include the entire SVG
> font
> > > file in every SVG that uses it?
> > >
> > > Thanks for any help.
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > > For additional commands, e-mail: batik-users-help@xml.apache.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
> >
> >
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

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


Re: External font support

Posted by Ryan Worley <rw...@webassociates.com>.
Thank you for your help, it looks like I'm getting closer although now I am
getting the following error when trying to view the image.  FYI, I'm using
Apache Cocoon and am attempting to serialize the created SVG to a PNG.


FATAL_E (2002-03-06) 09:23.19:765   [core.xslt-processor]
(/images/level1-off/100/14/PRODUCTS.png)
HttpProcessor[8080][3]/TraxErrorHandler: Error in TraxTransformer:
javax.xml.transform.TransformerException:
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
javax.xml.transform.TransformerException:
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1230)
 at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)
---------
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
 at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:96)
 at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
.java:190)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1186)
 at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)
---------
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
 at
org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:230)
 at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
 at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
.java:190)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1186)
 at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)
---------
org.apache.batik.transcoder.TranscoderException: null
Enclosed Exception:
http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
 at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
Source)
 at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
 at
org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:226)
 at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
 at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
.java:190)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1186)
 at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)
---------
org.apache.batik.bridge.BridgeException: http://xml.apache.org:-1
An I/O error occured while processing the URI 'henhc.svg#HelveticaNeue'
specified on the element <font-face-uri>
 at org.apache.batik.bridge.BridgeContext.getReferencedElement(Unknown
Source)
 at org.apache.batik.bridge.SVGFontUtilities.getFontFamily(Unknown Source)
 at org.apache.batik.bridge.SVGTextElementBridge.getAttributeMap(Unknown
Source)
 at
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedStrings(Unknown
Source)
 at
org.apache.batik.bridge.SVGTextElementBridge.buildAttributedString(Unknown
Source)
 at org.apache.batik.bridge.SVGTextElementBridge.buildGraphicsNode(Unknown
Source)
 at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(Unknown Source)
 at org.apache.batik.bridge.GVTBuilder.buildComposite(Unknown Source)
 at org.apache.batik.bridge.GVTBuilder.build(Unknown Source)
 at org.apache.batik.transcoder.image.ImageTranscoder.transcode(Unknown
Source)
 at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown
Source)
 at
org.apache.cocoon.serialization.SVGSerializer.notify(SVGSerializer.java:226)
 at org.apache.cocoon.xml.dom.SVGBuilder.endDocument(SVGBuilder.java:92)
 at
org.apache.xalan.transformer.ResultTreeHandler.endDocument(ResultTreeHandler
.java:190)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j
ava:1186)
 at
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3139)
 at java.lang.Thread.run(Thread.java:484)


----- Original Message -----
From: "Vincent Hardy" <vi...@sun.com>
To: "Batik Users" <ba...@xml.apache.org>
Sent: Tuesday, March 05, 2002 11:52 PM
Subject: Re: External font support


> Ryan,
>
> Yes, Batik supports external SVG fonts. See the example:
>
> samples/tests/spec/fonts/fontExternalFont.svg
>
> and:
>
> http://nagoya.apache.org/svgfonts/index.svg
>
> (to be viewed with Batik).
>
> Cheers,
> Vincent
>
> Ryan Worley wrote:
> >
> > Does Batik currently support embedding of external SVG fonts?  I've made
> > several different attempts using variations of font-face and
font-face-uri
> > but have not have success yet.  Do we have to include the entire SVG
font
> > file in every SVG that uses it?
> >
> > Thanks for any help.
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: batik-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org
>
>
>


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


Re: External font support

Posted by Vincent Hardy <vi...@sun.com>.
Ryan,

Yes, Batik supports external SVG fonts. See the example:

samples/tests/spec/fonts/fontExternalFont.svg

and:

http://nagoya.apache.org/svgfonts/index.svg

(to be viewed with Batik).

Cheers,
Vincent

Ryan Worley wrote:
> 
> Does Batik currently support embedding of external SVG fonts?  I've made
> several different attempts using variations of font-face and font-face-uri
> but have not have success yet.  Do we have to include the entire SVG font
> file in every SVG that uses it?
> 
> Thanks for any help.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: batik-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: batik-users-help@xml.apache.org

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


RE: External font support

Posted by Thierry Kormann <tk...@ilog.fr>.

> Does Batik currently support embedding of external SVG fonts?  I've made
> several different attempts using variations of font-face and font-face-uri
> but have not have success yet.  Do we have to include the entire SVG font
> file in every SVG that uses it?


Yes.

You can have a look at the svg examples we have in
samples/tests/spec/text or samples/tests/spec/fonts/

Thierry.


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