You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Patrick Hess <pa...@ish.de> on 2003/12/05 15:24:13 UTC

SVG problem after move to production server

Hi all,

I got a problem after deploying my current cocoon application to the 
production server. Before I was developing on Windows 2000 with JDK 
1.4.1, Tomcat 4.1.21 and Cocoon 2.1.2 which does what I expect :)

After moving the production server (Debian Woody) with the same 
Tomcat/JDK version including fonts does not work as expected. Only 
difference beside the OS is that tomcat is running on a headless jvm.

In my development version this SVG snippet works fine and includes the 
font a expected:

<svg ...>
         <defs>
                 <style type="text/css">
                 <![CDATA[
                   @font-face {
                     font-family: 'Composite';
                     src: url('svg/comp.svg#Composite') format(svg);
                   }
                   @font-face {
                     font-family: 'Arial';
                     src: url('svg/arial.svg#Arial') format(svg);
                   }
                 ]]>
                 </style>
         </defs>
	...
</svg>

This DOES NOT work (for me) on the linux enviroment and I wonder why...
Including the font directly to the SVG file works in both environments:

<svg ...>
	<svg width="100%" height="100%">
		<defs>
			<font horiz-adv-x=...>
				...
			</font>
		</defs>
	</svg>
	...
</svg>

Has anybody a usefull hint for me why this happends? As a workaround a 
included the fonts to the main SVG (images) but that's not what I want 
to have for the future.

Thanks for reading this and have a nice weekend ;)
-- 
Patrick Hess



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


Re: SVG problem after move to production server

Posted by Patrick Hess <po...@pbone.biz>.
Jorg Heymans wrote:

> Is there any reason why you're including the font like this? Can't you 
> just keep them as plain ttf's and put them in $JAVA_HOME/jre/lib/fonts? 
> I'm assuming these svg/arial.svg are ttf fonts that you converted with 
> batik, i've never seen this notation.

The described way turned out to be "more reliable" to me. As far as I 
understood from the specs this is also a valid way to include the fonts. 
I could keep the plain TTF files but I don't want to if possible :) Yes, 
I converted the TTF->SVG using the util in batik.

> Are you sure that on windows you're getting the font from your 
> svg/arial.svg file and not from your windows font directory?

Very good point, need to check this! As far as I remember I checked this 
when playing with the fonts on windows (removed font to see batik 
falling back to another font) but as I'm not sure anymore I will check!

Patrick



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


Re: SVG problem after move to production server

Posted by Jorg Heymans <jh...@domek.be>.

Patrick Hess wrote:

> 
> <svg ...>
>         <defs>
>                 <style type="text/css">
>                 <![CDATA[
>                   @font-face {
>                     font-family: 'Composite';
>                     src: url('svg/comp.svg#Composite') format(svg);
>                   }
>                   @font-face {
>                     font-family: 'Arial';
>                     src: url('svg/arial.svg#Arial') format(svg);
>                   }
>                 ]]>
>                 </style>
>         </defs>

Is there any reason why you're including the font like this? Can't you 
just keep them as plain ttf's and put them in $JAVA_HOME/jre/lib/fonts? 
I'm assuming these svg/arial.svg are ttf fonts that you converted with 
batik, i've never seen this notation.

Are you sure that on windows you're getting the font from your 
svg/arial.svg file and not from your windows font directory?

svg would look something like (untested)

<text font-family="Another" font-size="24">mytext</text>


Jorg


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


Re: SVG problem after move to production server

Posted by Patrick Hess <po...@pbone.biz>.
Jorg Heymans wrote:

> did you read http://wiki.cocoondev.org/Wiki.jsp?page=Embedding_SVG_Fonts

Yes, I did -- no helpful in my case and I don't want to embedd the 
fonts. I want to have them external.

> On the other hand, have you tried absolute paths in your url section?

I just tried it and unfortunaly it does not work...

Patrick




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


Re: SVG problem after move to production server

Posted by Jorg Heymans <jh...@domek.be>.
did you read http://wiki.cocoondev.org/Wiki.jsp?page=Embedding_SVG_Fonts

It might give you more insight.

On the other hand, have you tried absolute paths in your url section?

Jorg

Patrick Hess wrote:

> 
> Hi all,
> 
> I got a problem after deploying my current cocoon application to the 
> production server. Before I was developing on Windows 2000 with JDK 
> 1.4.1, Tomcat 4.1.21 and Cocoon 2.1.2 which does what I expect :)
> 
> After moving the production server (Debian Woody) with the same 
> Tomcat/JDK version including fonts does not work as expected. Only 
> difference beside the OS is that tomcat is running on a headless jvm.
> 
> In my development version this SVG snippet works fine and includes the 
> font a expected:
> 
> <svg ...>
>         <defs>
>                 <style type="text/css">
>                 <![CDATA[
>                   @font-face {
>                     font-family: 'Composite';
>                     src: url('svg/comp.svg#Composite') format(svg);
>                   }
>                   @font-face {
>                     font-family: 'Arial';
>                     src: url('svg/arial.svg#Arial') format(svg);
>                   }
>                 ]]>
>                 </style>
>         </defs>
>     ...
> </svg>
> 
> This DOES NOT work (for me) on the linux enviroment and I wonder why...
> Including the font directly to the SVG file works in both environments:
> 
> <svg ...>
>     <svg width="100%" height="100%">
>         <defs>
>             <font horiz-adv-x=...>
>                 ...
>             </font>
>         </defs>
>     </svg>
>     ...
> </svg>
> 
> Has anybody a usefull hint for me why this happends? As a workaround a 
> included the fonts to the main SVG (images) but that's not what I want 
> to have for the future.
> 
> Thanks for reading this and have a nice weekend ;)


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