Hi, I have a problem with embedding fonts while running Apache FOP within a web application. This seems to be caused by a problem with reading the font metrics from a jar file.
Obviously FOP can read the configuration from the jar, it also doesn't complain while starting: 2008-07-02 10:04:04,651 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:123) - Starting font configuration... 2008-07-02 10:04:04,656 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:318) - Adding font jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/News_Gothic_MT.ttf, metric file jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/ttfnewsgothic.xml 2008-07-02 10:04:04,657 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:322) - Font triplet NewsGothicMT, normal, 400 2008-07-02 10:04:04,657 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:318) - Adding font jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/News_Gothic_MT_Bold.ttf, metric file jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/ttfnewsgothicbold.xml 2008-07-02 10:04:04,658 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:322) - Font triplet NewsGothicMT, normal, 700 2008-07-02 10:04:04,659 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:318) - Adding font jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/News_Gothic_MT_Italic.ttf, metric file jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/ttfnewsgothicitalic.xml 2008-07-02 10:04:04,660 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:322) - Font triplet NewsGothicMT, italic, 400 2008-07-02 10:04:04,660 DEBUG org.apache.fop.render.PrintRendererConfigurator (PrintRendererConfigurator.java:203) - Finished font configuration in 8ms 2008-07-02 10:04:04,733 DEBUG org.apache.fop.fonts.FontSetup (FontSetup.java:224) - Registering: NewsGothicMT,normal,400 under F15 2008-07-02 10:04:04,733 DEBUG org.apache.fop.fonts.FontSetup (FontSetup.java:224) - Registering: NewsGothicMT,normal,700 under F16 2008-07-02 10:04:04,734 DEBUG org.apache.fop.fonts.FontSetup (FontSetup.java:224) - Registering: NewsGothicMT,italic,400 under F17 Also embedding images from the same jar isn't a problem, but using the font leads to trouble, the error message in the logfile is: 2008-07-02 10:04:14,068 ERROR org.apache.fop.fo.FOTreeBuilder (FOTreeBuilder.java:229) - javax.xml.transform.TransformerException: java.lang.RuntimeException: Cannot load font: failed to create Source from metrics file jar:file:/var/lib/cm4all/tomcat6/base/billy/webapps/CMAdmin/WEB-INF/lib/CMBilling-0.0.1-SNAPSHOT.jar!/layouts/LIVINGNET_2008_06_05/fonts/ttfnewsgothic.xml Running FOP having the font metrics as a normal file works perfectly, but for productive usage this isn't very helpful. I would be very grateful, if someone has an idea to get this working! Kind regards, Thomas -- View this message in context: http://www.nabble.com/Embedding-fonts-tp18238271p18238271.html Sent from the FOP - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]