Anyone please? Do we just need to say this is not going to work for TTC files? I am just setting this up incorrectly?
On Tue, 2009-06-09 at 10:28 -0500, Steve Ebersole wrote: > Ooops, I had temporarily disabled the font registration code at one > point to try to work around stuff and forgotten to re-enable it. After > re-enabling it, I am getting an exception about reading a TrueType font > collection. I have only one ttc file (uming.ttc), so i have to assume > it is that one being processed. > > The userconfig is generated by my code, and here is what gets passed in: > <fop version="1.0"> > <strict-configuration>true</strict-configuration> > <renderers> > <renderer mime="application/pdf"> > <fonts> > ... > <font > embed-url="file:/home/steve/projects/sandbox/jdocbook/target/docbook/staging/fonts/uming.ttc"> > <font-triplet > style="normal" > name="AR PL UMing CN" > weight="normal"/> > <font-triplet > style="normal" > name="AR PL UMing CN" > weight="bold"/> > <font-triplet > style="italic" > name="AR PL UMing CN" > weight="bold"/> > <font-triplet > style="italic" > name="AR PL UMing CN" > weight="normal"/> > </font> > </fonts> > </renderer> > </renderers> > </fop> > > > I have attached the output log as well as the fragments of java code > used to create this userconfig. > > > Here is the snipped exception (present in the log too): > > java.lang.IllegalArgumentException: For TrueType collection you must > specify which font to select (-ttcname) > at org.apache.fop.fonts.truetype.TTFFile.readFont(TTFFile.java:480) > at > org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:98) > at > org.apache.fop.fonts.truetype.TTFFontLoader.read(TTFFontLoader.java:84) > at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:190) > at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:139) > at org.apache.fop.fonts.LazyFont.load(LazyFont.java:134) > at org.apache.fop.fonts.LazyFont.getAscender(LazyFont.java:241) > at org.apache.fop.fonts.Font.getAscender(Font.java:106) > at > org.apache.fop.layoutmgr.BlockLayoutManager.initialize(BlockLayoutManager.java:89) > at > org.apache.fop.layoutmgr.AbstractLayoutManager.getChildLM(AbstractLayoutManager.java:119) > at > org.apache.fop.layoutmgr.FlowLayoutManager.getNextKnuthElements(FlowLayoutManager.java:75) > at > org.apache.fop.layoutmgr.PageBreaker.getNextKnuthElements(PageBreaker.java:144) > at > org.apache.fop.layoutmgr.AbstractBreaker.getNextBlockList(AbstractBreaker.java:553) > at > org.apache.fop.layoutmgr.PageBreaker.getNextBlockList(PageBreaker.java:136) > at > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:303) > at > org.apache.fop.layoutmgr.AbstractBreaker.doLayout(AbstractBreaker.java:265) > at > org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:107) > at > org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:238) > at > org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:120) > at org.apache.fop.fo.FOTreeBuilder > $MainFOHandler.endElement(FOTreeBuilder.java:348) > at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:177) > at > com.icl.saxon.output.ContentHandlerProxy.endElement(ContentHandlerProxy.java:137) > at com.icl.saxon.output.ProxyEmitter.endElement(ProxyEmitter.java:91) > at > com.icl.saxon.output.NamespaceEmitter.endElement(NamespaceEmitter.java:150) > at > com.icl.saxon.output.GeneralOutputter.writeEndTag(GeneralOutputter.java:681) > at > com.icl.saxon.style.LiteralResultElement.process(LiteralResultElement.java:293) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:225) > at > com.icl.saxon.style.XSLCallTemplate.process(XSLCallTemplate.java:187) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLIf.process(XSLIf.java:78) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:225) > at com.icl.saxon.style.XSLTemplate.start(XSLTemplate.java:198) > at com.icl.saxon.Controller.applyTemplates(Controller.java:246) > at > com.icl.saxon.style.XSLApplyTemplates.process(XSLApplyTemplates.java:135) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at > com.icl.saxon.style.LiteralResultElement.process(LiteralResultElement.java:289) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:225) > at com.icl.saxon.style.XSLTemplate.start(XSLTemplate.java:198) > at com.icl.saxon.Controller.applyTemplates(Controller.java:246) > at com.icl.saxon.Controller.defaultAction(Controller.java:271) > at com.icl.saxon.Controller.applyTemplates(Controller.java:236) > at > com.icl.saxon.style.XSLApplyTemplates.process(XSLApplyTemplates.java:135) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLIf.process(XSLIf.java:78) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLOtherwise.process(XSLOtherwise.java:48) > at com.icl.saxon.style.XSLChoose.process(XSLChoose.java:96) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLOtherwise.process(XSLOtherwise.java:48) > at com.icl.saxon.style.XSLChoose.process(XSLChoose.java:96) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLOtherwise.process(XSLOtherwise.java:48) > at com.icl.saxon.style.XSLChoose.process(XSLChoose.java:96) > at > com.icl.saxon.style.StyleElement.processChildren(StyleElement.java:634) > at com.icl.saxon.style.XSLTemplate.expand(XSLTemplate.java:225) > at com.icl.saxon.style.XSLTemplate.start(XSLTemplate.java:198) > at com.icl.saxon.Controller.applyTemplates(Controller.java:246) > at com.icl.saxon.Controller.run(Controller.java:178) > at com.icl.saxon.Controller.transformDocument(Controller.java:1086) > at com.icl.saxon.Controller.transform(Controller.java:953) > at > org.jboss.jdocbook.render.impl.BasicRenderer.performRendering(BasicRenderer.java:165) > at > org.jboss.jdocbook.render.impl.BasicRenderer.render(BasicRenderer.java:153) > at > org.jboss.jdocbook.render.impl.BasicRenderer.render(BasicRenderer.java:98) > at > org.jboss.maven.plugins.jdocbook.GenerationMojo.process(GenerationMojo.java:112) > at > org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.doExecute(AbstractDocBookMojo.java:379) > at > org.jboss.maven.plugins.jdocbook.AbstractDocBookMojo.execute(AbstractDocBookMojo.java:407) > at > org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) > ... > > > I am really at a loss. > > > On Mon, 2009-06-08 at 10:07 -0500, Steve Ebersole wrote: > > Back at this yet again. > > > > This time I added a feature to the maven plugin to actually dump the FO > > file (I actually use the SAX approach for rendering, so iit was > > previously not needed). I am attaching it here. As a total noob I have > > no clue what to look for. I do see the correct font-family selections > > in the FO file. I also added some output from my XSLT where I specify > > the pickfont selections and verified that those are correct. > > > > Yet I see lots of warning log messages which seem related to not being > > able to locate the fonts. Things like certain glyphs not being > > available, etc. I've attached the log output as well, but here is an > > example: > > > > WARNING: Font "Symbol,normal,700" not found. Substituting with > > "Symbol,normal,400". > > WARNING: Font "ZapfDingbats,normal,700" not found. Substituting with > > "ZapfDingbats,normal,400". > > WARNING: Glyph "符" (0x7b26) not available in font "Helvetica-Bold". > > > > > > > > > > > > On Tue, 2009-04-07 at 19:32 +0200, Andreas Delmelle wrote: > > > On 07 Apr 2009, at 17:39, Steve Ebersole wrote: > > > > > > Hi Steve > > > > > > > I tried a mixture of the two. I have a problem though. > > > > FontInfoFinder.find is returning me null. Basically I have a directory > > > > of fonts (.ttf and .ttc). I was trying the following code fragment > > > > (which is where FontInfoFinder.find is returning null): > > > > <snip /> > > > > > > > > So basically, for each direcrtory containing fonts > > > > (environment.getFontDirectories()), I iterate the files > > > > (fontDirectory.listFiles()). So fontFile is the .ttf files. I have > > > > verified this in debugger. Yet when fontInfoFinder.find is called on > > > > that .ttf file, it returns null. > > > > > > Most likely an issue with the TTF file. FOP still chokes on some TTFs > > > (mostly on Linux and Mac OS, or OTF variants) > > > Do you get any log output indicating such a problem? > > > > > > Checking the code, FontInfoFinder.find() will return null if: > > > * there is a FontCache and the file has failed to load on a previous > > > attempt. We only display the corresponding message if the log-level is > > > set to DEBUG. > > > > > > * the file failed to load, but it is the first attempt. In FOP Trunk, > > > a message is then broadcast to the attached EventListener (if it has > > > been registered). > > > > > > > > > HTH! > > > > > > Andreas > > > > > > > > > --------------------------------------------------------------------- > > > To unsubscribe, e-mail: [email protected] > > > For additional commands, e-mail: [email protected] > > > -- Steve Ebersole <[email protected]> Hibernate.org --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
