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

font-base wrongly interpreted when embedding font and input in folder

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Resolution: Fixed
    • 0.92
    • None
    • unqualified
    • None
    • Operating System: other
      Platform: PC
    • 40120

    Description

      Environment: jre1.5.0_06, any fo (or xml-xsl) file rendered to pdf using a non
      standard and embedded font.
      Under the following conditions:

      • NOT specifying a font-base in the userconfig
      • Specifying base as "." (probably irrelevant)
      • Embedding a font through userconfig.xml, assuming the current directory for
        both the .ttf as well as the metrics xml, ie embed="file:gothic.ttf" and of
        course those font files sitting there
      • Actually using that font in the fo
      • the fo (or xml in a xml/xsl setup) being in a separate folder (ie fop "-fo
        store/my.fo"). The file being specified relatively to the current directory is
        probably irrelevant.

      the resulting pdf is generated without complained, but actually does not have
      the .ttf embedded, resulting in a font not found when opening the pdf. Further
      investigating showed if the .ttf is ALSO copied to the relative path of the
      source .fo (or xml), it DOES embed in the pdf.

      Main problem is the renderer does not complain, combined with the fop
      documentation stating "(font-base) specifies the base URL based on which
      relative font URLs will be resolved. If not specified defaults to the base URL
      above", which is obvisouly not true when the source file is in a folder.

      Workaround is to specify a font-base in the userconfig, even if it's a simple
      ".". Refering to the .ttf in an absolute way worked too (eeww).

      Attachments

        Activity

          People

            fop-dev@xmlgraphics.apache.org fop-dev
            jmeijer@notice.nu Jeroen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: