forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sjur Moshagen <>
Subject Re: FOPNGSerializer and user-configurable fonts - fonts not found
Date Tue, 09 Sep 2008 11:07:57 GMT
Den 9. sep. 2008 kl. 13.23 skrev Jeremias Maerki:

>> I admit that this is really a FOP question, and not really a Forrest
>> issue. Then on the other hand, FOP 0.94 (which we are using) and the
>> font-finding features have been around for some time now, and should
>> work, or problems should be known, and workarounds should be  
>> available
>> in e-mail list archives, wikis, FAQs etc. I have found nothing, which
>> makes me wonder whether there is a problem in the interaction between
>> Forrest and FOP.
> My first question would be: How does your configuration file look  
> like?
> A minimal FOP config file for font auto-detection would look like  
> this:
> <fop>
>  <renderers>
>    <renderer mime="application/pdf">
>      <fonts>
>        <auto-detect/>
>      </fonts>
>    </renderer>
>  </renderers>
> </fop>
> The most common problem is that the layout of the config file is  
> wrong.
> FOP isn't that good at detecting problem there.

I got this far on my own:)

The FOP config file I have at the moment looks like:

<fop version="1.0"

   <default-page-settings height="11in" width="8.26in"/>
     <renderer mime="application/pdf">
         <font metrics-url="DejaVuSans.ttf.xml"
               kerning="yes" embed-url="DejaVuSans.ttf">
           <font-triplet name="DejaVu Sans" style="normal"  
           <font-triplet name="DejaVu Sans,Book" style="normal"  
         <font metrics-url="DejaVuSans-Bold.ttf.xml"
               kerning="yes" embed-url="DejaVuSans-Bold.ttf">
           <font-triplet name="DejaVu Sans" style="normal"  
           <font-triplet name="DejaVu Sans,Bold" style="normal"  
         <font metrics-url="DejaVuSans-BoldOblique.ttf.xml"
               kerning="yes" embed-url="/Library/Fonts/DejaVuSans- 
           <font-triplet name="DejaVu Sans" style="italic"  
           <font-triplet name="DejaVu Sans,BoldOblique" style="italic"  
         <font metrics-url="DejaVuSans-Oblique.ttf.xml"
               kerning="yes" embed-url="/Library/Fonts/DejaVuSans- 
           <font-triplet name="DejaVu Sans" style="italic"  
           <font-triplet name="DejaVu Sans,Oblique" style="italic"  
     <!-- Some other renderers follow here -->

> I would strongly suggest to upgrade to FOP 0.95 soon. There have  
> been a
> large number of improvements in font handling and auto-detection after
> the 0.94 release. It also goes the remaining way to make XML font
> metrics files really obsolete. This is be a matter of replacing the  
> file for FOP and XML Graphics Commons. I've done that locally. I can
> commit the changes if everyone's ok with it.


> I've been able to create a PDF with FOP 0.95 and customized fonts but
> only if I hardcode the config file to this:
> <user-config>src/documentation/fop-config.xml</user-config>
> With the entity, I didn't manage. So maybe the above problem is not a
> wrong config file format but maybe the somewith with those entity  
> files.

The entity seems to work fine for me. If I change the config file ref  
to some non-existing file/path, I get back an error that the config  
file could not be found.

I would like to have a look at the entity thing as soon as FOP 0.95 is  
available. And some days a go, David Crossley posted an alternative  
solution[1] to the entity one. Hopefully we can make one of them work.

Best regards,


View raw message