Extract from the Changes file :

- BaseDir property is now used for loading custom fonts (Bug #7608)
  (thanks to Arnd Beissner and Brian O'Kelley)

Applying this fix broke some stuff as far as I can tell. Fop ships with a
config file that has this property commented out. As a result basedir
appears to be null and FOP tries loading fonts with something like
nullfonts/metrics/arial.xml which of course does not evaluate to a decent
filename. Ok after figuring that out I set the basedir to ./ which is in my
case correct for loading fonts. Doing this however breaks SVG cause it
tries to set the basedir as the url of the SVGElement causing the following
exception to be thrown

java.net.MalformedURLException: no protocol: ./
        at java.net.URL.<init>(URL.java:473)
        at java.net.URL.<init>(URL.java:376)
        at java.net.URL.<init>(URL.java:330)
        at org.apache.fop.svg.SVGElement.layout(Unknown Source)
        at org.apache.fop.fo.flow.InstreamForeignObject.layout(Unknown
Source)
        at org.apache.fop.fo.flow.BlockContainer.layout(Unknown Source)
        at org.apache.fop.fo.flow.Flow.layout(Unknown Source)
        at org.apache.fop.fo.flow.Flow.layout(Unknown Source)
        at org.apache.fop.fo.pagination.PageSequence.format(Unknown Source)
        at org.apache.fop.apps.StreamRenderer.render(Unknown Source)
        at org.apache.fop.fo.FOTreeBuilder.endElement(Unknown Source)
        <snip>

A better solution to the font loading problem would be something like a
system property I think (eg. if you were to define
org.apache.fop.fontbasedir
and prepend it to the embedded font filename). At least this solution would
allow the font base dir to be specified at runtime which is important for
embedding.

Erik


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

Reply via email to