FOP
  1. FOP
  2. FOP-1552

[PATCH] AFP Renderer does not properly handle AFP fonts with relative metric

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Fixed
    • Affects Version/s: trunk
    • Fix Version/s: None
    • Component/s: font/unqualified
    • Labels:
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • External issue ID:
      45342

      Description

      I've tried to use AFP renderer along with AFP fonts with relative metrics, which results in wrong alignment of text. For both Outline fonts (scalable) and Raster fonts.

      After some debugging I've updated the org.apache.fop.render.afp.fonts.AFPFontReader.java file to process these fonts correctly, I attach the updated Java file below. (the main problem is, that AFP fonts have two measurement unit setting, which should be both considered for fonts with relative metric - metric resolution and shape resolution; and the factor to be applied to measurement values depends on the pointsize in some cases)

      In the source file there is also repaired one other problem - there was bug, that the font reader did not process the last font orientation, it is repaired in the method processFontPosition().

      The changes were made on the source file from FOP version 0.95.beta.

      1. AFPFontReader Patch.txt
        8 kB
        Emil Maskovsky
      2. AFPFontReader.java
        20 kB
        Emil Maskovsky

        Activity

        No work has yet been logged on this issue.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development