ICEpdf
  1. ICEpdf
  2. PDF-845

Font mapping is incorrect for 2 embedded fonts

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 5.1.1
    • Fix Version/s: 5.1.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      All

      Description

      With the provided PDF file, there are embedded fonts that are non being rendered correctly. The customer has the following comments which might help to narrow down the issue:

      "On the cover page of the pdf the customer uses two embedded fonts that display with incorrect mappings (AveniR LTSTD-Light and AveniD LTSTD-Black) when viewed with IcePDF v5.1.0 and v5.1.1-p2.

      In Reader they render correctly and they printed fine on the ImagePress.
      Ghostscript 8.64 appears to have the same mapping problem as IcePDF.
      Ghostscript 9.0.5 seems to render the pdf correctly. "

        Activity

        Hide
        Patrick Corless added a comment -

        I've spend some time looking at this this morning. The font in question is a type CIDFontType0C and there is indeed something funky happening with the encoding. The font is in question has a Adobe Standard encoding but for some reason we are treating it as an Identity-h. Further investigation into 5176 CFF specification is needed as well as verifying any font program parsing issues.

        Show
        Patrick Corless added a comment - I've spend some time looking at this this morning. The font in question is a type CIDFontType0C and there is indeed something funky happening with the encoding. The font is in question has a Adobe Standard encoding but for some reason we are treating it as an Identity-h. Further investigation into 5176 CFF specification is needed as well as verifying any font program parsing issues.
        Hide
        Patrick Corless added a comment -

        Finally manged to find the line in the spec that corresponds to the strange mapping

        "The “CFF” font program has a Top DICT that does not use CIDFont operators: The CIDs shall be used directly as GID values, and the glyph procedure shall be retrieved using the CharStrings INDEX. Detection happens
        in the setEncoding method.."

        The above is only for CFF programs that are of Type0 or Type0c and are CID.

        The font engine has no notion of this concept and thus some refactoring is needed to make sure we can pass the FontDescriptor subtype info into the font engine. No we can chose to use an identity mapping if we have a CFF font that is of Type0 or Type0c. And presto the PDF in question renders correctly.

        Show
        Patrick Corless added a comment - Finally manged to find the line in the spec that corresponds to the strange mapping "The “CFF” font program has a Top DICT that does not use CIDFont operators: The CIDs shall be used directly as GID values, and the glyph procedure shall be retrieved using the CharStrings INDEX. Detection happens in the setEncoding method.." The above is only for CFF programs that are of Type0 or Type0c and are CID. The font engine has no notion of this concept and thus some refactoring is needed to make sure we can pass the FontDescriptor subtype info into the font engine. No we can chose to use an identity mapping if we have a CFF font that is of Type0 or Type0c. And presto the PDF in question renders correctly.
        Hide
        Patrick Corless added a comment -

        Updates have passed QA, marking as resolved.

        Show
        Patrick Corless added a comment - Updates have passed QA, marking as resolved.

          People

          • Assignee:
            Patrick Corless
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: