Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1505

[PATCH] CharStringRenderer does not render CharString data correctly for Type 2 CFF fonts

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.0.0
    • 1.8.0
    • FontBox
    • None

    Description

      I have a requirement to render the characters from a OTF CFF font and to get the bounding box for each character. I initially tried to use the CharStringRenderer but found the bounding box data was very different to the actual characters. Because the renderer outputs the character as a GeneralPath, I was able to draw this to a bitmap and view it. What I found was that the characters were not being drawn correctly which was effecting the bounds. I will post an image and patch in a moment to show the issue and resolution I used.

      Attachments

        1. patch.diff
          23 kB
          Robert Meyer
        2. pic1.PNG
          29 kB
          Robert Meyer

        Issue Links

          Activity

            People

              lehmi Andreas Lehmkühler
              rmeyer Robert Meyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: