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

Error resolving Font metric URL Jar

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Duplicate
    • 0.94
    • None
    • font/unqualified
    • None
    • Operating System: Windows XP
      Platform: PC
    • 43571

    Description

      I was able to load the font metrics file from my classpath, where the font
      metrics files reside inside a jar file.

      The Base url is set:

      fopFactory.setFontBaseURL(getClass().getResource("/com/foo/").toExternalForm());

      During newFop() in the
      org.apache.fop.render.PrintRendererConfigurator#getFontInfoFromConfiguration the
      Source is created for the metrics file (the URL in the FOURIReolver is
      jar:file:/c:/myjar.jar!/com/foo/verdana.xml). Then later on
      org.apache.fop.fonts.LazyFont#load the Source remains null (the URL in the
      FOURIReolver is now file:/c:/myjar.jar!/com/foo/verdana.xml (no jar: prefix
      ). Consequently the connection.connect() throws a FileNotFoundException

      Attachments

        Issue Links

          Activity

            People

              fop-dev@xmlgraphics.apache.org fop-dev
              rparree@gmail.com Raphael Parree
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: