Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0
-
None
-
None
-
Ubuntu 14.04, Java 8u45
Description
I want to use the Ubuntu Mono font, which is installed on my system. But FOP throws an exception when it is auto-detecting the fonts:
Unable to load font file: file:/usr/share/fonts/truetype/ubuntu-font-family/UbuntuMono-R.ttf java.lang.ArrayIndexOutOfBoundsException: 1047 at org.apache.fop.fonts.truetype.OpenFont.readPostScript(OpenFont.java:1320) at org.apache.fop.fonts.truetype.OpenFont.readFont(OpenFont.java:736) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:109) at org.apache.fop.fonts.truetype.OFFontLoader.read(OFFontLoader.java:93) at org.apache.fop.fonts.FontLoader.getFont(FontLoader.java:124) at org.apache.fop.fonts.FontLoader.loadFont(FontLoader.java:108) at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:254) at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63) at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:97) at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229) at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82) at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147) at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127) at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170) at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187) at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75) at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135) at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105) at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350) at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107) at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104) at org.apache.fop.apps.Fop.<init>(Fop.java:78) at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:179) at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:240)
The same exception is thrown for other variants of the font (bold, italic, etc).
Note that this font can be downloaded freely from http://font.ubuntu.com/
The latest version of the font is 0.80, and that is what I have installed on my system.