You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Christofer Dutz <du...@c-ware.de> on 2003/11/28 22:13:56 UTC
Using user-defined fonts in SVGs
Hi,
I am having some trouble adding additional fonts to my cocoon
environment. What I did manage to do (after a good hint from this
mailinglist) is to include the font-definition into the svg. The only
thing that makes me a little upset is the bad performance. A svg with
less than 1K is polluted with up to 70K font-definition.
Normaly this would be no problem, as I am using the SVG-to-JPG
serializer. But it sems to slow down the whole process of image generation.
Is there a way to add fonts to cocoon without having to restart the VM?
Christofer Dutz
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Using user-defined fonts in SVGs
Posted by Bruce Robertson <br...@mta.ca>.
Quoting Jorg Heymans <jh...@domek.be>:
>
> > Normaly this would be no problem, as I am using the SVG-to-JPG
> > serializer. But it sems to slow down the whole process of image
> > generation.
>
> This is interesting. Have you actually done any benchmarks on this? In all
> my svg's i have always included the whole font definition without really
> thinking this could have a performance impact.
>
> >
> > Is there a way to add fonts to cocoon without having to restart the VM?
> >
>
> Not sure. How are you currently referencing fonts? Have you tried posting
> this on the batik list?
>
> rgds
> Jorg
It is possible that my piece on embedding SVG fonts in the Cocoon wiki might be
apropos:
http://wiki.cocoondev.org/Wiki.jsp?page=Embedding_SVG_Fonts
This code will prepend scalable font glyphs to a given SVG document, and it only
prepends the glyphs necessary for the given document, a benefit when working
with large Unicode fonts.
I agree that rasterizing is more pricey with embedded fonts, so I just skip this
part of the pipeline if I'm rasterizing. In that case, you can be sure that the
font is available locally; there's no need to provide embedded glyphs.
Yrs,
--
Bruce Robertson,
Dept. of Classics, Mount Allison University
http://heml.mta.ca
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Using user-defined fonts in SVGs
Posted by Christofer Dutz <du...@c-ware.de>.
I haven't realy done benchmarking ... I just saw that without the fonts
the images almost emediately appeared and with fonts it was also fast,
but just slow enough to be anoying.
I am nor realy including the Fonts in the svg's. I am using a
xsl-document containing the font, generating a svg, which generates a
JPEG for dynamic navigation-images. So mabe this doesn't disturb you the
way you do thing. I just saw that for me it is to slow and I wanted to
know if there is some kind of dynamig font-loading or font caching in batik.
Chris
Jorg Heymans wrote:
>>Normaly this would be no problem, as I am using the SVG-to-JPG
>>serializer. But it sems to slow down the whole process of image
>>generation.
>>
>>
>
>This is interesting. Have you actually done any benchmarks on this? In all
>my svg's i have always included the whole font definition without really
>thinking this could have a performance impact.
>
>
>
>>Is there a way to add fonts to cocoon without having to restart the VM?
>>
>>
>>
>
>Not sure. How are you currently referencing fonts? Have you tried posting
>this on the batik list?
>
>rgds
>Jorg
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Using user-defined fonts in SVGs
Posted by Jorg Heymans <jh...@domek.be>.
> Normaly this would be no problem, as I am using the SVG-to-JPG
> serializer. But it sems to slow down the whole process of image
> generation.
This is interesting. Have you actually done any benchmarks on this? In all
my svg's i have always included the whole font definition without really
thinking this could have a performance impact.
>
> Is there a way to add fonts to cocoon without having to restart the VM?
>
Not sure. How are you currently referencing fonts? Have you tried posting
this on the batik list?
rgds
Jorg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org