Uploaded image for project: 'FOP'
  1. FOP
  2. FOP-2532

[PATCH] FontCache throws java.lang.IllegalArgumentException: URI scheme is not "file" for jar embedded fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.2
    • None
    • None

    Description

      If using <auto-detect /> fop finds fonts embedded in jar files (via MANIFEST.MF entries as described at http://xmlgraphics.apache.org/fop/2.0/fonts.html#autodetect) and tries to add them to the font cache. This throws the following exception:

      java.lang.IllegalArgumentException: URI scheme is not "file"
      26677/0|	at java.io.File.<init>(File.java:421)
      26677/0|	at org.apache.fop.fonts.FontCache.addFont(FontCache.java:335)
      26677/0|	at org.apache.fop.fonts.autodetect.FontInfoFinder.getFontInfoFromCustomFont(FontInfoFinder.java:157)
      26677/0|	at org.apache.fop.fonts.autodetect.FontInfoFinder.find(FontInfoFinder.java:269)
      26677/0|	at org.apache.fop.fonts.FontAdder.add(FontAdder.java:63)
      26677/0|	at org.apache.fop.fonts.FontDetectorFactory$DefaultFontDetector.detect(FontDetectorFactory.java:110)
      26677/0|	at org.apache.fop.fonts.FontManager.autoDetectFonts(FontManager.java:229)
      26677/0|	at org.apache.fop.fonts.DefaultFontConfigurator.configure(DefaultFontConfigurator.java:82)
      26677/0|	at org.apache.fop.render.PrintRendererConfigurator.getCustomFontCollection(PrintRendererConfigurator.java:147)
      26677/0|	at org.apache.fop.render.PrintRendererConfigurator.setupFontInfo(PrintRendererConfigurator.java:127)
      26677/0|	at org.apache.fop.render.intermediate.IFUtil.setupFonts(IFUtil.java:170)
      26677/0|	at org.apache.fop.render.intermediate.IFRenderer.setupFontInfo(IFRenderer.java:187)
      26677/0|	at org.apache.fop.area.RenderPagesModel.<init>(RenderPagesModel.java:75)
      26677/0|	at org.apache.fop.area.AreaTreeHandler.setupModel(AreaTreeHandler.java:135)
      26677/0|	at org.apache.fop.area.AreaTreeHandler.<init>(AreaTreeHandler.java:105)
      26677/0|	at org.apache.fop.render.RendererFactory.createFOEventHandler(RendererFactory.java:350)
      26677/0|	at org.apache.fop.fo.FOTreeBuilder.<init>(FOTreeBuilder.java:107)
      26677/0|	at org.apache.fop.apps.Fop.createDefaultHandler(Fop.java:104)
      26677/0|	at org.apache.fop.apps.Fop.<init>(Fop.java:78)
      26677/0|	at org.apache.fop.apps.FOUserAgent.newFop(FOUserAgent.java:179)
      26677/0|	at org.apache.fop.apps.FopFactory.newFop(FopFactory.java:240)
      

      Attachments

        Issue Links

          Activity

            People

              ssteiner Simon Steiner
              brianpreuss Brian Preuß
              Votes:
              4 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: