ICEpdf
  1. ICEpdf
  2. PDF-223

CID font not correctly rendered

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.1.1
    • Fix Version/s: 4.2
    • Component/s: Core/Parsing
    • Labels:
      None
    • Environment:
      pro version, ok on OS release
    • Assignee Priority:
      P1

      Description

      The fonts in question CID based and have toUniode mapping which is why the OS version work OK as does PRO text selection, copy/paste. I'll have to look closer but CID font are loading correctly we just not getting the correct glyphs.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Salesforce Case []
        Fix Version/s 4.2 [ 10243 ]
        Arran Mccullough made changes -
        Salesforce Case [5007000000E7Cmi]
        Patrick Corless made changes -
        Assignee Priority P1
        Hide
        Patrick Corless added a comment -

        Currently no test file to work against. Moving issue out of 4.2 target stream.

        Show
        Patrick Corless added a comment - Currently no test file to work against. Moving issue out of 4.2 target stream.
        Patrick Corless made changes -
        Fix Version/s 4.2 [ 10243 ]
        Hide
        Patrick Corless added a comment -

        Retargeting 4.2, got the file.

        Show
        Patrick Corless added a comment - Retargeting 4.2, got the file.
        Patrick Corless made changes -
        Fix Version/s 4.2 [ 10243 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #24051 Tue Mar 01 09:36:44 MST 2011 patrick.corless PDF-223 updated the font class to bail if an cid font with now embedded font was found and fall back to the awt font loading or OS loading for the font in question.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/util/ContentParser.java
        Hide
        Patrick Corless added a comment -

        This turned out to be fairly complicated, many attempts were made to try and load the correct toUnicode cmap file for the fonts in question but I was always 29 characters on the glyph indexes. Normally the fonts in question CID would have a corresponding embedded font but this document did not.

        I've updated the Font class to stop the font initialization if the the type0 cid font doesn't have an embedded font file. The content parser can pick up on the null initialization and fall back to awt font loading which can handle the toUnicode mapping better.

        Ideally an Nfont solution would be better but the fix as is should help load other documents like this.

        Show
        Patrick Corless added a comment - This turned out to be fairly complicated, many attempts were made to try and load the correct toUnicode cmap file for the fonts in question but I was always 29 characters on the glyph indexes. Normally the fonts in question CID would have a corresponding embedded font but this document did not. I've updated the Font class to stop the font initialization if the the type0 cid font doesn't have an embedded font file. The content parser can pick up on the null initialization and fall back to awt font loading which can handle the toUnicode mapping better. Ideally an Nfont solution would be better but the fix as is should help load other documents like this.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Ken Fyten made changes -
        Resolution Fixed [ 1 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Patrick Corless added a comment -

        Revisited the problem and manged to figure out why I wasn't getting the correct glyph for the specifed toUnicode value. In this case I needed to insure the CIDToGIDMap was assigned so that the toUnicode map could be used to find the right GID. Pretty simple in hindsight.

        Show
        Patrick Corless added a comment - Revisited the problem and manged to figure out why I wasn't getting the correct glyph for the specifed toUnicode value. In this case I needed to insure the CIDToGIDMap was assigned so that the toUnicode map could be used to find the right GID. Pretty simple in hindsight.
        Patrick Corless made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Tyler Johnson made changes -
        Salesforce Case [5007000000E7Cmi] [5007000000E7Cmi, 5007000000G9e3a]
        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: