ICEpdf
  1. ICEpdf
  2. PDF-875

Embedded TrueType font not loading correctly

    Details

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

      Description

      The PDF in question loads without error but fails to render the glyphs of any of the embedded fonts. There are no errors during the parsing of the file but after a little debugging the required loca table is not found and those the font file doesn't contain any valid instructions for creating the glyphs.

        Activity

        Patrick Corless created issue -
        Patrick Corless made changes -
        Field Original Value New Value
        Fix Version/s 5.2 [ 10970 ]
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44511 Thu Apr 16 13:32:05 MDT 2015 patrick.corless PDF-875 added integrity check to the TrueType font table parsing, on failure we no throw state exception so we can try reparsing the file using a different type.
        Files Changed
        Commit graph MODIFY /icepdf/trunk/icepdf/core/src/org/icepdf/core/pobjects/fonts/FontFactory.java
        Hide
        Patrick Corless added a comment -

        After taking a closer look a the table directory of the TrueType font it became apparent that there where entries missing and some that weren't defined in the specification. On a hunch I checked the OpenType specification and it turns out the Font is miss labeled and is actually a OpenType font.

        I'll need to through an exception in the TrueType parsing if there is no loca table. This exception will bubble up to the FontFactory at which point we can try and parse the font as a OpenType font.

        Show
        Patrick Corless added a comment - After taking a closer look a the table directory of the TrueType font it became apparent that there where entries missing and some that weren't defined in the specification. On a hunch I checked the OpenType specification and it turns out the Font is miss labeled and is actually a OpenType font. I'll need to through an exception in the TrueType parsing if there is no loca table. This exception will bubble up to the FontFactory at which point we can try and parse the font as a OpenType font.
        Hide
        Patrick Corless added a comment -

        Added suggested code execution and the missing PDF content is now visible.

        Show
        Patrick Corless added a comment - Added suggested code execution and the missing PDF content is now visible.
        Patrick Corless made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Arran Mccullough made changes -
        Support Case References Support Case #13389 - https://icesoft.my.salesforce.com/50070000019FFTE
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #44554 Thu Apr 23 06:50:36 MDT 2015 patrick.corless PDF-875 added integrity check to the TrueType font table parsing, on failure we no throw state exception so we can try reparsing the file using a different type.
        Files Changed
        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 -

        Marking as closed

        Show
        Patrick Corless added a comment - Marking as closed
        Patrick Corless made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

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

            Dates

            • Created:
              Updated:
              Resolved: