Hi there,

First already thanks for helping me with my previous question. I've found the solution. Seems a collegue of mine made a dirty fix to one of his problems. The project on which I work consists of two clients: a fat (swing) and a web. The swing app is deployed using Java Webstart.

Now, since our fonts are located in a jar file, and due to webstart (according to my collegue) which prohibits you to load from a specific jar file, he had 'overriden' the FontInfo class and decide not to use the URLBuilder but to use an other method (code shown):
public URL getMetricsFile() throws FOPException {
 try {
  return this.getClass().getResource(metricsFile);
// return URLBuilder.buildURL(Configuration.getFontBaseURL(), metricsFile);
 } catch (Exception e) {
  throw new FOPException("Invalid font metrics file: " + metricsFile
                    + " (" + e.getMessage() + ")");
 }
}

But since I was doing my test on Linux in a shell, this seemed to fail. Anyway, on to the next problem.

As said, we have a jar file which is both used in the fat client and the web client. In this jar, the fonts are to be found in fonts/metrics/... and fonts/truetype/...

Now, I've found a post that says that if you want to load a font from a jar, you should use:
jar:file:///home/peter/fop/fop-0.20.5/lib/labeling.jar!fonts/metrics/arial.xml
or something like this.

Now, my problem is that when I use the above statement in my userconfig (again I'm testing in a shell with no fontBaseDir or baseDir set in the userconfig), I get an error that says: Failed to read a font metrics file: Invalid font metrics file: jar:file:///home/peter/fop/fop-0.20.5/lib/labeling.jar!fonts/metrics/arial.xml (no !/ in spec)

I've also tried variations but the result goes from other Exceptions to the same error. Anyway, what I would like to have is a solutions where the userconfig may be different for each deployment (fat or web) but that the fonts are in a jar file and are found :-)

BB
Peter


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

Reply via email to