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

        Arran Mccullough created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.1.2 [ 11872 ]
        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.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44115 Wed Feb 25 13:00:30 MST 2015 patrick.corless PDF-845 added support for a “CFF” font program that 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
        Files Changed
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontDescriptor.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontManager.java
        Commit graph MODIFY /icepdf/branches/icepdf-5.0.1/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontFactory.java
        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.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44155 Tue Mar 03 10:08:58 MST 2015 patrick.corless PDF-845 added support for a “CFF” font program that 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
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontFactory.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontDescriptor.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontManager.java
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: