That's it! I wasn't able to load the configuration file. Well - it was
loaded, but at the bottom of the file there was another
<fonts>
</fonts>
section which was empty, so my previous setting were lost... my fault...

It works now, thank you very much (and thanks to all of you who tried to
help me!)


I'm glad your problem is solved, but this means our documentation (and my
understanding of what is going in with the AWT renderer) is wrong. It will
be a few days at least before I can get to it, but I'll try to find out what
is going on there & get it documented correctly.

Well, i was digging in the source, and it's not so difficult to fix (but i don't know much about Java, so my patch is pseudo-code only).


To reproduce, add the following lines to your configuration file:

<fonts>
   <font metrics-file="test.xml" kerning="yes"       embed-file="test.ttf">
      <font-triplet name="test" style="normal" weight="normal"/>
    </font>
</fonts>
<fonts>
  <!-- empty!! -->
</fonts>

The Problem is in src/org/apache/fop/configuration/ConfigurationParser.java, line 170:

else if (localName.equals("fonts")) {    // list of fonts starts
            fontList = new java.util.ArrayList(10);
}

If this is called twice (because there's more than one <fonts>-section in the configuration file) it will delete the previously registered fonts. So it should be replaced by something like

else if (localName.equals("fonts")) {    // list of fonts starts
    if (fontList!=NULL)
        throw "[ERR] configuration file has more than one <fonts>-section!";
    else
        fontList = new java.util.ArrayList(10);
}

Hope that helps!
Chris


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



Reply via email to