Fop
  1. Fop
  2. FOP-1059

Font metrics-url and embed-url are aways absolute, fails without good error message

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: pdf
    • Labels:
      None
    • Environment:
      Operating System: All
      Platform: All
    • External issue ID:
      36729

      Description

      Under 1.0 the metrics-url and embed-url attribites of the <font> element are
      not relative to the specified base directory.

      Therefore they are loading from the working directory of the process (which is
      usually c:\windows\system32 if your server is running as a windows service).

      Under 0.20 one was able to call:

      org.apache.fop.configuration.Configuration.put
      ("fontBaseDir","/absolute/path/to/metrics/directory");

      or put this in your configuration file.

      Is is possible to add a way to specify a base directory for the font metric
      files, or make them relative to the configuration file itself. Otherwise one
      needs to encode system specific paths in the configuration file.

      Also, this fails silently at the moment, and later on throws a null pointer
      error. Logging of the failure to load a metric file is labelled as todo. Since
      this is going to be a common error, a meaningful message will save users hours
      of trying to figure out what is happening....

      Attached is a patch file to log a meaningful error. Also I have moved the flag
      of successfull loading so that the flag is only set if they are really loaded.

      Should the exception propogate up rather than swallowing it?

      1. LazyFont.diff
        2 kB
        Ken Blackler

        Activity

        Hide
        Ken Blackler added a comment -

        Attachment LazyFont.diff has been added with description: Changes to enable logging when unable to find metrics file

        Show
        Ken Blackler added a comment - Attachment LazyFont.diff has been added with description: Changes to enable logging when unable to find metrics file
        Hide
        Manuel Mall added a comment -

        This should be fixed now, see http://svn.apache.org/viewcvs?
        rev=366718&view=rev .

        Show
        Manuel Mall added a comment - This should be fixed now, see http://svn.apache.org/viewcvs? rev=366718&view=rev .
        Hide
        Glenn Adams added a comment -

        batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

        Show
        Glenn Adams added a comment - batch transition pre-FOP1.0 resolved+fixed bugs to closed+fixed

          People

          • Assignee:
            fop-dev
            Reporter:
            Ken Blackler
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development