ICEpdf
  1. ICEpdf
  2. PDF-354

Font engine not correctly handling CID and GID values that differ

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.2.2
    • Fix Version/s: 4.3
    • Component/s: Font Engine
    • Labels:
      None
    • Environment:
      PRO

      Description

      A client sent in a set of PDFs that had embedded font programs but the font engine could not correctly display the glyphs. The glyphs where asian and the font was a CID font with with CIDtoGID that wasn't the standard identity mapping. The font engine and the respective Cmap is incorrectly initialized making it impossible to correctly map a none identity cmap.

      For example consider the cid's below, the current algorithm that organizes and compresses the CID -> GID makes it imposible to retreive the GID value for a given CID because CID and GID are not equal.

      CID GID
      0x0704 = 1796 14
      0x0db3 = 3507 24
      0x08ba = 2234 5
      ox0d15 = 3349 53

        Activity

        Patrick Corless created issue -
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26859 Tue Dec 13 12:48:54 MST 2011 patrick.corless PDF-354 update to how cidToGid cmaps are applied when working with CFF fonts.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/ofont/CMap.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/CMap.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26901 Thu Dec 15 12:30:32 MST 2011 patrick.corless PDF-354 clean up hex string processing for 2 and 4 byte cid's.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/HexStringObject.java
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/LiteralStringObject.java
        Commit graph ADD /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/content
        Hide
        Patrick Corless added a comment -

        After a round a QA there where a few remaining issues around how StringObject handle there 2 and 4 bytes cids. Pretty sure I've go this all straightened out for now but will do one more round of qa to be sure.

        Show
        Patrick Corless added a comment - After a round a QA there where a few remaining issues around how StringObject handle there 2 and 4 bytes cids. Pretty sure I've go this all straightened out for now but will do one more round of qa to be sure.
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #26917 Fri Dec 16 04:33:18 MST 2011 patrick.corless PDF-354 touched up padding for uneven hex strings, which was causing some types of images not to load.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/HexStringObject.java
        Hide
        Patrick Corless added a comment -

        Quite a bit of work was done to address the cid to gid mapping error. QA passed and there are quite a few other documents that had the same problem that now render correctly.

        Marking as resolved.

        Show
        Patrick Corless added a comment - Quite a bit of work was done to address the cid to gid mapping error. QA passed and there are quite a few other documents that had the same problem that now render correctly. Marking as resolved.
        Patrick Corless made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: