私はApache FOP 2.2でAFPでTrueTypeフォントを使用しようとしています。AFPでTrueTypeフォントをApache FOPで使用するには?
私は私が正しく物事を構成し信じているが、私は次の例外を取得しています:
以下java.lang.ClassCastException: org.apache.fop.afp.modca.MapDataResource cannot be cast to org.apache.fop.afp.modca.MapCodedFont
at org.apache.fop.afp.modca.ActiveEnvironmentGroup.getCurrentMapCodedFont(ActiveEnvironmentGroup.java:286)
at org.apache.fop.afp.modca.ActiveEnvironmentGroup.createFont(ActiveEnvironmentGroup.java:201)
at org.apache.fop.afp.modca.AbstractPageObject.createFont(AbstractPageObject.java:149)
at org.apache.fop.afp.DataStream.createFont(DataStream.java:331)
at org.apache.fop.afp.DataStream.addFontsToCurrentPage(DataStream.java:313)
at org.apache.fop.render.afp.AFPDocumentHandler.endPage(AFPDocumentHandler.java:310)
at org.apache.fop.render.intermediate.util.IFDocumentHandlerProxy.endPage(IFDocumentHandlerProxy.java:167)
at org.apache.fop.render.intermediate.EventProducingFilter.endPage(EventProducingFilter.java:48)
at org.apache.fop.render.intermediate.IFRenderer.renderPage(IFRenderer.java:603)
at org.apache.fop.area.RenderPagesModel.renderPage(RenderPagesModel.java:193)
at org.apache.fop.area.RenderPagesModel.checkPreparedPages(RenderPagesModel.java:174)
at org.apache.fop.area.RenderPagesModel.addPage(RenderPagesModel.java:146)
at org.apache.fop.layoutmgr.AbstractPageSequenceLayoutManager.finishPage(AbstractPageSequenceLayoutManager.java:316)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.finishPage(PageSequenceLayoutManager.java:226)
at org.apache.fop.layoutmgr.PageSequenceLayoutManager.activateLayout(PageSequenceLayoutManager.java:145)
at org.apache.fop.area.AreaTreeHandler.endPageSequence(AreaTreeHandler.java:267)
at org.apache.fop.fo.pagination.PageSequence.endOfNode(PageSequence.java:130)
at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:360)
at org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:190)
は私conf.xml構成の抜粋です:
<renderer mime="application/x-afp">
<fonts>
<font name="Script MT Bold" kerning="yes" embed-url="/fonts/SCRIPTBL.TTF">
<font-triplet name="Script MT Bold" style="normal" weight="normal"/>
</font>
</fonts>
</renderer>
私は、追加の構成が必要でください?
また、AFPにTrueTypeフォントを埋め込む必要がありますか、単にリファレンスを含めてメインフレームプリンタに依存させて解決することはできますか?