hi,
thx a lot. i think this should work. what about defining only the fontBaseDir 
like:
-----------------------
<entry>
           <key>fontBaseDir</key>
           <value>${cocoon.parameters.baseDir}fonts</value>
</entry>
-----------------------
and
-----------------------
<font metrics-file="arial.xml" kerning="yes" embed-file="arial.ttf">
       <font-triplet name="Arial" style="normal" weight="normal"/>
</font>
----------------------

this should work also, not?

greetings Matthias


Matthias Müller wrote
> Is there a possibility to add a relative path here?

I had a similar problem when I tried to embed fonts following these
instructions http://cocoon.apache.org/2.1/userdocs/pdf-serializer.html
I solved it with a dynamically generated config file.

root sitemap.xmap:

  <serializer name="fo2pdf" ...>
    <user-config>cocoon://font-config</user-config>
  </serializer>

  ...

  <match pattern="font-config">
    <generate src="context://WEB-INF/fonts/config.jx" type="jx"/>
    <serialize type="xml"/>
  </match>

WEB-INF/fonts/config.jx:

  <configuration xmlns:jx="...">
    <jx:set var="fontdir" value="${context.getRealPath('/WEB-INF/fonts')}"/>
    <fonts>
      <font metrics-file="${fontdir}/verdana.xml" kerning="yes"
            embed-file="${fontdir}/verdana.ttf">
        <font-triplet name="Verdana" weight="normal" style="normal"/>
      </font>
      ...
    </fonts>
  </configuration>

It's a bit hacked together, but it works everywhere.


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]








        
                
___________________________________________________________ 
Der frühe Vogel fängt den Wurm. Hier gelangen Sie zum neuen Yahoo! Mail: 
http://mail.yahoo.de

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to