cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rover Rock <>
Subject Re: embedding fonts
Date Thu, 15 Oct 2009 09:26:43 GMT
Yes, i do.

Ok, i will try to write what i did.
I didnt download any fonts, i used windows arial fonts

1. Created the font metric files, like this:

$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
  org.apache.fop.fonts.apps.TTFReader \
  C:\WINNT\Fonts\arial.ttf D:\fop-fonts\arial.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
  org.apache.fop.fonts.apps.TTFReader \
  C:\WINNT\Fonts\arialb.ttf  D:\fop-fonts\arialb.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
  org.apache.fop.fonts.apps.TTFReader \
  C:\WINNT\Fonts\arialbi.ttf D:\fop-fonts\arialbi.ttf.xml
$ java -cp optional\fop-0.20.4.jar;core\xercesImpl-2.0.0.jar;core\xml-apis.jar \
  org.apache.fop.fonts.apps.TTFReader \
  C:\WINNT\Fonts\ariali.ttf  D:\fop-fonts\ariali.ttf.xml

It was successfully.

2. Created a config file which is stored in D:\:fop-fonts\ directory, called

    <font metrics-file="D:/fop-fonts/arial.ttf.xml"
          kerning="yes" embed-file="C:/WINNT/Fonts/arial.ttf">
      <font-triplet name="Arial" style="normal" weight="normal"/>
      <font-triplet name="ArialMT" style="normal" weight="normal"/>
    <font metrics-file="D:/fop-fonts/arialb.ttf.xml"
          kerning="yes" embed-file="C:/WINNT/Fonts/arialb.ttf">
      <font-triplet name="Arial" style="normal" weight="bold"/>
      <font-triplet name="ArialMT" style="normal" weight="bold"/>
    <font metrics-file="D:/fop-fonts/arialbi.ttf.xml"
          kerning="yes" embed-file="C:/WINNT/Fonts/arialbi.ttf">
      <font-triplet name="Arial" style="italic" weight="bold"/>
      <font-triplet name="ArialMT" style="italic" weight="bold"/>
    <font metrics-file="D:/fop-fonts/ariali.ttf.xml"
          kerning="yes" embed-file="C:/WINNT/Fonts/ariali.ttf">
      <font-triplet name="Arial" style="italic" weight="normal"/>
      <font-triplet name="ArialMT" style="italic" weight="normal"/>

3. Modified the sitemap.xmap file, add


to the fo2pdf serializer

4. restarted the cocoon.

2009/10/9 Laurent Medioni <>

> You refer to a D:/fop-fonts/config.xml in your sitemap ?
> Can you summarize what you are usingm what you have done so far and what
> you get at the end ?
> Thanks.
> ________________________________________
> From: Rover Rock []
> Sent: jeudi, 8. octobre 2009 23:02
> To:
> Subject: Re: embedding fonts
> Ok, I see.
> > Are the fonts provided through your config file Unicode fonts ?
> I use only the default install, i did not modify any config file and
> Unicode fonts settings. Where and what can i do?:)
> >+ When you use fop elements (in your xml or in a xsl) how are the
> <fo:root> parameters configured ? The Locale should be among them + the
> default font, …."
> I didnt configure <fo:root> parameters...
> ____________________________________________________________
> • This email and any files transmitted with it are CONFIDENTIAL and
> intended
>  solely for the use of the individual or entity to which they are
> addressed.
> • Any unauthorized copying, disclosure, or distribution of the material
> within
>  this email is strictly forbidden.
> • Any views or opinions presented within this e-mail are solely those of
> the
>  author and do not necessarily represent those of Odyssey Financial
> Technologies SA unless otherwise specifically stated.
> • An electronic message is not binding on its sender. Any message referring
> to
>  a binding engagement must be confirmed in writing and duly signed.
> • If you have received this email in error, please notify the sender
> immediately
>  and delete the original.

View raw message